diff options
Diffstat (limited to 'src/xmlcomposer.cpp')
-rw-r--r-- | src/xmlcomposer.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/xmlcomposer.cpp b/src/xmlcomposer.cpp index dd178fb..9f943ed 100644 --- a/src/xmlcomposer.cpp +++ b/src/xmlcomposer.cpp @@ -42,6 +42,21 @@ #include "domhelpers.h" #include "tags.h" + +wstring formatInt(int num) +{ + char buff[16]; + + // Certain OSs don't support swprintf :( + sprintf(buff, "%d", num); + + wstring n; + for(char* s = buff; *s; s++) + n.append(1, *s); + + return n; +} + /* ---------------------------------------------------------------------------------- * CONSTRUCTION */ @@ -295,20 +310,6 @@ void XmlComposer::incrementAutoCount(int type) m_autocount[type]++; } -wstring XmlComposer::formatInt(int num) -{ - char buff[16]; - - // Certain OSs don't support swprintf :( - sprintf(buff, "%d", num); - - wstring n; - for(char* s = buff; *s; s++) - n.append(1, *s); - - return n; -} - /* ---------------------------------------------------------------------------------- * CONVENIENCE MACROS USED BELOW |