]> git.saurik.com Git - wxWidgets.git/commitdiff
moved XMLIDs counter inside GetXMLID to prevent initialization order problems
authorVáclav Slavík <vslavik@fastmail.fm>
Fri, 19 Jan 2001 00:16:03 +0000 (00:16 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Fri, 19 Jan 2001 00:16:03 +0000 (00:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/xml/xmlres.cpp

index 04ca779d3837adff6ce542f06854ba5041d37bb8..c67ffc3cae733df806af6400ce15fff922be75ef 100644 (file)
@@ -873,10 +873,11 @@ struct XMLID_record
 };
 
 static XMLID_record *XMLID_Records[XMLID_TABLE_SIZE] = {NULL};
-static int XMLID_LastID = wxID_HIGHEST;
 
 /*static*/ int wxXmlResource::GetXMLID(const char *str_id)
 {
+    static int XMLID_LastID = wxID_HIGHEST;
+    
     int index = 0;
     
     for (const char *c = str_id; *c != '\0'; c++) index += (int)*c;