# 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>
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";
}
}
osg::Node * SGText::appendText(const SGPropertyNode* configNode,
- SGPropertyNode* modelRoot, const osgDB::ReaderWriter::Options* options)
+ SGPropertyNode* modelRoot, const osgDB::Options* options)
{
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 );