]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/patch.h
Implement buffer operations
[xonotic/netradiant.git] / radiant / patch.h
index a1f1d272a20a682bb987337d12f8f481925d787b..3cfd1ad2b86156c39b123b5d6ad54547f3c6000f 100644 (file)
@@ -44,6 +44,7 @@
 
 #include <set>
 #include <limits>
+#include <util/buffer.h>
 
 #include "math/frustum.h"
 #include "string/string.h"
@@ -803,9 +804,10 @@ void exportXML( XMLImporter& importer ){
        }
 
        {
-               char width[16], height[16];
-               sprintf( width, "%u", Unsigned( m_width ) );
-               sprintf( height, "%u", Unsigned( m_height ) );
+               auto width = u::buffer<16>();
+               auto height = u::buffer<16>();
+               width.sprintf( "%u", Unsigned( m_width ) );
+               height.sprintf( "%u", Unsigned( m_height ) );
                StaticElement element( "matrix" );
                element.insertAttribute( "width", width );
                element.insertAttribute( "height", height );