From 3a309abfab3762d1c3bc2f90b961582e83d5971a Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Thu, 18 Jun 2009 17:21:25 +0200 Subject: * In case of a 'for' loop, don't declare the iterator of a type that has a larger value range when the iterator can take a maximum value of a more efficient data type. (int to uint8 in most cases). * Other minor cleanups, Null pointer checks etc. --HG-- branch : trunk --- src/shared/Log.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shared/Log.cpp') diff --git a/src/shared/Log.cpp b/src/shared/Log.cpp index c90b96b291f..0f1138279ff 100644 --- a/src/shared/Log.cpp +++ b/src/shared/Log.cpp @@ -235,7 +235,7 @@ void Log::InitColors(const std::string& str) std::istringstream ss(str); - for(int i = 0; i < LogLevels; ++i) + for(uint8 i = 0; i < LogLevels; ++i) { ss >> color[i]; @@ -246,7 +246,7 @@ void Log::InitColors(const std::string& str) return; } - for(int i = 0; i < LogLevels; ++i) + for(uint8 i = 0; i < LogLevels; ++i) m_colors[i] = ColorTypes(color[i]); m_colored = true; -- cgit v1.2.3