implement a fix to floating point precision as proposed by schuellc.

This commit is contained in:
Lee Thomason
2014-01-14 12:30:03 -08:00
parent 61871d60a6
commit c3708ccf08
5 changed files with 80 additions and 43 deletions

View File

@@ -116,9 +116,9 @@ inline int TIXML_SNPRINTF( char* buffer, size_t size, const char* format, ... )
#define TIXML_SSCANF sscanf
#endif
static const int TIXML2_MAJOR_VERSION = 1;
static const int TIXML2_MINOR_VERSION = 0;
static const int TIXML2_PATCH_VERSION = 12;
static const int TIXML2_MAJOR_VERSION = 1;
static const int TIXML2_MINOR_VERSION = 0;
static const int TIXML2_PATCH_VERSION = 13;
namespace tinyxml2
{
@@ -1321,6 +1321,11 @@ public:
XMLAttribute* a = FindOrCreateAttribute( name );
a->SetAttribute( value );
}
/// Sets the named attribute to value.
void SetAttribute( const char* name, float value ) {
XMLAttribute* a = FindOrCreateAttribute( name );
a->SetAttribute( value );
}
/**
Delete an attribute.