diff --git a/contrib/src/ogl/basic.cpp b/contrib/src/ogl/basic.cpp index b18c4ad517..16e198b1e2 100644 --- a/contrib/src/ogl/basic.cpp +++ b/contrib/src/ogl/basic.cpp @@ -30,12 +30,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif - #include #include #include diff --git a/contrib/src/ogl/basic2.cpp b/contrib/src/ogl/basic2.cpp index e12fa3e07c..d8a59bc725 100644 --- a/contrib/src/ogl/basic2.cpp +++ b/contrib/src/ogl/basic2.cpp @@ -30,12 +30,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif - #include #include #include diff --git a/contrib/src/ogl/canvas.cpp b/contrib/src/ogl/canvas.cpp index 755510eb83..55e87da514 100644 --- a/contrib/src/ogl/canvas.cpp +++ b/contrib/src/ogl/canvas.cpp @@ -30,12 +30,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif - #include #include #include diff --git a/contrib/src/ogl/lines.cpp b/contrib/src/ogl/lines.cpp index 73710978f7..fac1286eac 100644 --- a/contrib/src/ogl/lines.cpp +++ b/contrib/src/ogl/lines.cpp @@ -31,12 +31,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif - #include #include diff --git a/contrib/src/ogl/misc.cpp b/contrib/src/ogl/misc.cpp index c6dc4c8d7e..d40bd8a896 100644 --- a/contrib/src/ogl/misc.cpp +++ b/contrib/src/ogl/misc.cpp @@ -32,11 +32,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif #include #include #include diff --git a/contrib/src/ogl/ogldiag.cpp b/contrib/src/ogl/ogldiag.cpp index d7ec3fc0b6..a1b71884b0 100644 --- a/contrib/src/ogl/ogldiag.cpp +++ b/contrib/src/ogl/ogldiag.cpp @@ -30,17 +30,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#include -#else -#include -#include -#ifdef _MSC_VER -//using namespace std; -#endif -#endif - #include #include #include diff --git a/contrib/src/ogl/oglmisc.cpp b/contrib/src/ogl/oglmisc.cpp index a9a466c2da..30deb1d87b 100644 --- a/contrib/src/ogl/oglmisc.cpp +++ b/contrib/src/ogl/oglmisc.cpp @@ -32,11 +32,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif #include #include #include diff --git a/contrib/src/xrc/xmlres.cpp b/contrib/src/xrc/xmlres.cpp index b16bbd70c1..6e2ab13778 100644 --- a/contrib/src/xrc/xmlres.cpp +++ b/contrib/src/xrc/xmlres.cpp @@ -1182,10 +1182,21 @@ static XRCID_record *XRCID_Records[XRCID_TABLE_SIZE] = {NULL}; XRCID_record **rec_var = (oldrec == NULL) ? &XRCID_Records[index] : &oldrec->next; *rec_var = new XRCID_record; - (*rec_var)->id = ++XRCID_LastID; (*rec_var)->key = wxStrdup(str_id); (*rec_var)->next = NULL; + wxChar *end; + int asint = wxStrtol(str_id, &end, 10); + if (*str_id && *end == 0) + { + // if str_id was integer, keep it verbosely: + (*rec_var)->id = asint; + } + else + { + (*rec_var)->id = ++XRCID_LastID; + } + return (*rec_var)->id; } diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index b16bbd70c1..6e2ab13778 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -1182,10 +1182,21 @@ static XRCID_record *XRCID_Records[XRCID_TABLE_SIZE] = {NULL}; XRCID_record **rec_var = (oldrec == NULL) ? &XRCID_Records[index] : &oldrec->next; *rec_var = new XRCID_record; - (*rec_var)->id = ++XRCID_LastID; (*rec_var)->key = wxStrdup(str_id); (*rec_var)->next = NULL; + wxChar *end; + int asint = wxStrtol(str_id, &end, 10); + if (*str_id && *end == 0) + { + // if str_id was integer, keep it verbosely: + (*rec_var)->id = asint; + } + else + { + (*rec_var)->id = ++XRCID_LastID; + } + return (*rec_var)->id; }