]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/model/SGText.cxx
Make return type from loadPagedModel explicit.
[simgear.git] / simgear / scene / model / SGText.cxx
index e87b48a7765b8b7cac999e0a44a7289300542537..1da6c57cc2e8ac3aa1450fe5d8965511ce138d9d 100644 (file)
 #  include <simgear_config.h>
 #endif
 
+#include <cstdio>
+
 #include "SGText.hxx"
 
 #include <simgear/math/SGMath.hxx>
 #include <simgear/misc/sg_path.hxx>
+#include <simgear/misc/strutils.hxx>
 
 #include <osg/Geode>
 #include <osg/MatrixTransform>
@@ -41,9 +44,9 @@ public:
     offset( aOffset ),
     truncate( aTruncate ),
     numeric( aNumeric ),
-    format( aFormat )
+    format( simgear::strutils::sanitizePrintfFormat( aFormat ) )
   {
-    if( format.size() == 0 ) {
+    if( format.empty() ) {
       if( numeric ) format = "%f";
       else format = "%s";
     }
@@ -88,8 +91,6 @@ osg::Node * SGText::appendText(const SGPropertyNode* configNode,
 {
   SGConstPropertyNode_ptr p;
 
-  SG_LOG(SG_GENERAL, SG_DEBUG, "Creating a text object");
-
   osgText::Text * text = new osgText::Text();
   osg::Geode * g = new osg::Geode;
   g->addDrawable( text );