[ros-diffs] [tkreuzer] 49827: revert r49824

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Sat Nov 27 22:24:15 UTC 2010


Author: tkreuzer
Date: Sat Nov 27 22:24:15 2010
New Revision: 49827

URL: http://svn.reactos.org/svn/reactos?rev=49827&view=rev
Log:
revert r49824

Modified:
    trunk/reactos/tools/xml.cpp

Modified: trunk/reactos/tools/xml.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/xml.cpp?rev=49827&r1=49826&r2=49827&view=diff
==============================================================================
--- trunk/reactos/tools/xml.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/xml.cpp [iso-8859-1] Sat Nov 27 22:24:15 2010
@@ -18,7 +18,6 @@
 
 #ifdef _MSC_VER
 #pragma warning ( disable : 4786 )
-#pragma warning ( disable : 4996 )
 #endif//_MSC_VER
 
 #ifdef WIN32
@@ -42,6 +41,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include "xml.h"
+#include "ssprintf.h"
 
 #ifndef MAX_PATH
 #define MAX_PATH _MAX_PATH
@@ -100,9 +100,7 @@
 
 void XMLException::SetExceptionV ( const std::string& location, const char* format, va_list args )
 {
-    char buffer[1024];
-    _vsnprintf(buffer, sizeof(buffer)-1, format, args);
-    _e = location + ": " + buffer;
+    _e = location + ": " + ssvprintf(format,args);
 }
 
 void XMLException::SetException ( const std::string& location, const char* format, ... )
@@ -426,14 +424,13 @@
 XMLFile::Location() const
 {
     int line = 1;
-    char line_str[10];
     const char* p = strchr ( _buf.c_str(), '\n' );
     while ( p && p < _p )
     {
         ++line;
         p = strchr ( p+1, '\n' );
     }
-    return _filename + "(" + itoa(line, line_str, 10) + ")";
+    return ssprintf ( "%s(%i)",_filename.c_str(), line );
 }
 
 XMLAttribute::XMLAttribute()




More information about the Ros-diffs mailing list