From 781b3c9f17708cc5fe08eb3c9ee38d596364d97c Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Thu, 4 Mar 2010 22:41:19 -0700 Subject: Split Palette into Theme and UserPalette MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Themes can now control the colors they use. Colors in the Viewport (being names, particles, etc) can still be changed by the user. Also make ProgressBars more easily colored. DyePalette was made more flexible in the process. Also fixes comparing strings of different lengths insensitively. Reviewed-by: Thorbjørn Lindeijer --- src/utils/stringutils.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/utils/stringutils.cpp') diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index 9a53a372..01bf0d3c 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -138,7 +138,13 @@ int compareStrI(const std::string &a, const std::string &b) return comp; } - return 0; + // Check string lengths + if (itA == endA && itB == endB) + return 0; + else if (itA == endA) + return -1; + else + return 1; } bool isWordSeparator(char chr) -- cgit v1.2.3-60-g2f50