mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 07:49:56 +00:00
Fix warning issued by GCC 4.8 in oics/tinyxml.cpp
Fix warning issued by GCC 4.8 (and as far I remember 4.7 too) about not supported "%lf" format string: openmw/extern/oics/tinyxml.cpp: In member function ‘void TiXmlAttribute::SetDoubleValue(double)’: openmw/extern/oics/tinyxml.cpp:1269:50: warning: ISO C++98 does not support the ‘%lf’ gnu_printf format [-Wformat=] TIXML_SNPRINTF( buf, sizeof(buf), "%lf", _value); ^ Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
This commit is contained in:
parent
7fe7111c19
commit
6fbd940a2f
1 changed files with 4 additions and 4 deletions
8
extern/oics/tinyxml.cpp
vendored
8
extern/oics/tinyxml.cpp
vendored
|
@ -706,9 +706,9 @@ void TiXmlElement::SetDoubleAttribute( const char * name, double val )
|
|||
{
|
||||
char buf[256];
|
||||
#if defined(TIXML_SNPRINTF)
|
||||
TIXML_SNPRINTF( buf, sizeof(buf), "%f", val );
|
||||
TIXML_SNPRINTF( buf, sizeof(buf), "%f", val );
|
||||
#else
|
||||
sprintf( buf, "%f", val );
|
||||
sprintf( buf, "%f", val );
|
||||
#endif
|
||||
SetAttribute( name, buf );
|
||||
}
|
||||
|
@ -1266,9 +1266,9 @@ void TiXmlAttribute::SetDoubleValue( double _value )
|
|||
{
|
||||
char buf [256];
|
||||
#if defined(TIXML_SNPRINTF)
|
||||
TIXML_SNPRINTF( buf, sizeof(buf), "%lf", _value);
|
||||
TIXML_SNPRINTF( buf, sizeof(buf), "%f", _value);
|
||||
#else
|
||||
sprintf (buf, "%lf", _value);
|
||||
sprintf (buf, "%f", _value);
|
||||
#endif
|
||||
SetValue (buf);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue