From dd7df288448230fa6becee18e4259ce19976e367 Mon Sep 17 00:00:00 2001 From: archshift Date: Thu, 17 Jul 2014 20:11:33 -0700 Subject: Refactored cChatColor - Changed std::string fields to const char-pointers in order to wipe out potential issues with static initialization and global destructors - Deprecated cChatColor::Color() because the name does not match the value --- src/ChatColor.h | 52 +++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-) (limited to 'src/ChatColor.h') diff --git a/src/ChatColor.h b/src/ChatColor.h index 2189fd395..5a81c7edd 100644 --- a/src/ChatColor.h +++ b/src/ChatColor.h @@ -9,33 +9,35 @@ class cChatColor { public: - static const std::string Color; - static const std::string Delimiter; - - static const std::string Black; - static const std::string Navy; - static const std::string Green; - static const std::string Blue; - static const std::string Red; - static const std::string Purple; - static const std::string Gold; - static const std::string LightGray; - static const std::string Gray; - static const std::string DarkPurple; - static const std::string LightGreen; - static const std::string LightBlue; - static const std::string Rose; - static const std::string LightPurple; - static const std::string Yellow; - static const std::string White; + static const char * Color; + + /** @deprecated use ChatColor::Delimiter instead */ + static const char * Delimiter; + + static const char * Black; + static const char * Navy; + static const char * Green; + static const char * Blue; + static const char * Red; + static const char * Purple; + static const char * Gold; + static const char * LightGray; + static const char * Gray; + static const char * DarkPurple; + static const char * LightGreen; + static const char * LightBlue; + static const char * Rose; + static const char * LightPurple; + static const char * Yellow; + static const char * White; // Styles ( source: http://wiki.vg/Chat ) - static const std::string Random; - static const std::string Bold; - static const std::string Strikethrough; - static const std::string Underlined; - static const std::string Italic; - static const std::string Plain; + static const char * Random; + static const char * Bold; + static const char * Strikethrough; + static const char * Underlined; + static const char * Italic; + static const char * Plain; }; -- cgit v1.2.3 From 638ea10027f0e01a37d2592185e735e4c6f28338 Mon Sep 17 00:00:00 2001 From: archshift Date: Sat, 19 Jul 2014 15:28:55 -0700 Subject: ChatColor.h: The @deprecated tag slipped. Oops. --- src/ChatColor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ChatColor.h') diff --git a/src/ChatColor.h b/src/ChatColor.h index 5a81c7edd..74eb7d5dc 100644 --- a/src/ChatColor.h +++ b/src/ChatColor.h @@ -9,10 +9,10 @@ class cChatColor { public: - static const char * Color; + static const char * Delimiter; /** @deprecated use ChatColor::Delimiter instead */ - static const char * Delimiter; + static const char * Color; static const char * Black; static const char * Navy; -- cgit v1.2.3 From 93d29555e58df172bafba530afbc593c16ec66a3 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 21 Jul 2014 15:19:48 +0200 Subject: Style: Normalized to no spaces before closing parenthesis. --- src/ChatColor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ChatColor.h') diff --git a/src/ChatColor.h b/src/ChatColor.h index 74eb7d5dc..21377e27f 100644 --- a/src/ChatColor.h +++ b/src/ChatColor.h @@ -31,14 +31,14 @@ public: static const char * Yellow; static const char * White; - // Styles ( source: http://wiki.vg/Chat ) + // Styles + // source: http://wiki.vg/Chat static const char * Random; static const char * Bold; static const char * Strikethrough; static const char * Underlined; static const char * Italic; static const char * Plain; - }; // tolua_end -- cgit v1.2.3