From: Václav Slavík Date: Fri, 19 Jan 2001 00:16:03 +0000 (+0000) Subject: moved XMLIDs counter inside GetXMLID to prevent initialization order problems X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/429fdefcd794ba020bd47908318e97f6750a4255?hp=29fd317b4b5f7e9020ebb6f1187c5f8b3c28d5a3 moved XMLIDs counter inside GetXMLID to prevent initialization order problems git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/src/xml/xmlres.cpp b/contrib/src/xml/xmlres.cpp index 04ca779d38..c67ffc3cae 100644 --- a/contrib/src/xml/xmlres.cpp +++ b/contrib/src/xml/xmlres.cpp @@ -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;