mail[Wesnoth-commits] r28378 - /trunk/src/theme.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by koraq on August 08, 2008 - 17:58:
Author: mordante
Date: Fri Aug  8 17:58:18 2008
New Revision: 28378

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28378&view=rev
Log:
Fix some compiler warnings.

Modified:
    trunk/src/theme.cpp

Modified: trunk/src/theme.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/theme.cpp?rev=28378&r1=28377&r2=28378&view=diff
==============================================================================
--- trunk/src/theme.cpp (original)
+++ trunk/src/theme.cpp Fri Aug  8 17:58:18 2008
@@ -152,10 +152,18 @@
        }
 
 #ifdef DEBUG
-       // to be called from gdb
-       config& find_ref(const char* id, config& cfg) {
-               return find_ref(std::string(id),cfg);
-       }
+
+// to be called from gdb
+static config& find_ref(const char* id, config& cfg) {
+       return find_ref(std::string(id),cfg);
+}
+
+namespace {
+       // avoid some compiler warnings in stricter mode.
+       static config cfg;
+       static config& result = find_ref("", cfg);
+} // namespace
+
 #endif
 
 static void expand_partialresolution(config& dst_cfg, const config& top_cfg)




Related Messages


Powered by MHonArc, Updated Fri Aug 08 19:41:33 2008