aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-11-01 17:23:01 +0000
committerMike Buland <eichlan@xagasoft.com>2010-11-01 17:23:01 +0000
commit1035f576164ceb50f85b787459ad760e0ac7b2b9 (patch)
tree6e0b6030f100a2737286285e5246d72b7ecd43ea
parent76e1ecfabd1f831bc1810aeae65c0faf61d80cee (diff)
downloadlibgats-1035f576164ceb50f85b787459ad760e0ac7b2b9.tar.gz
libgats-1035f576164ceb50f85b787459ad760e0ac7b2b9.tar.bz2
libgats-1035f576164ceb50f85b787459ad760e0ac7b2b9.tar.xz
libgats-1035f576164ceb50f85b787459ad760e0ac7b2b9.zip
Wow...floats...I mean...wow...
-rw-r--r--src/dictionary.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dictionary.cpp b/src/dictionary.cpp
index 9791203..4430e73 100644
--- a/src/dictionary.cpp
+++ b/src/dictionary.cpp
@@ -191,7 +191,7 @@ int64_t Gats::Dictionary::getInt( const Bu::FString &sKey )
191double Gats::Dictionary::getFloat( const Bu::FString &sKey ) 191double Gats::Dictionary::getFloat( const Bu::FString &sKey )
192{ 192{
193 Gats::Float *pOb = dynamic_cast<Gats::Float *>( get( sKey ) ); 193 Gats::Float *pOb = dynamic_cast<Gats::Float *>( get( sKey ) );
194 if( pOb ) 194 if( !pOb )
195 throw Bu::ExceptionBase("Cannot use %s item '%s' as float.", 195 throw Bu::ExceptionBase("Cannot use %s item '%s' as float.",
196 typeToStr( get( sKey )->getType() ), sKey.getStr() ); 196 typeToStr( get( sKey )->getType() ), sKey.getStr() );
197 197
@@ -251,7 +251,7 @@ int64_t Gats::Dictionary::getInt( const Bu::FString &sKey ) const
251double Gats::Dictionary::getFloat( const Bu::FString &sKey ) const 251double Gats::Dictionary::getFloat( const Bu::FString &sKey ) const
252{ 252{
253 Gats::Float *pOb = dynamic_cast<Gats::Float *>( get( sKey ) ); 253 Gats::Float *pOb = dynamic_cast<Gats::Float *>( get( sKey ) );
254 if( pOb ) 254 if( !pOb )
255 throw Bu::ExceptionBase("Cannot use %s item '%s' as float.", 255 throw Bu::ExceptionBase("Cannot use %s item '%s' as float.",
256 typeToStr( get( sKey )->getType() ), sKey.getStr() ); 256 typeToStr( get( sKey )->getType() ), sKey.getStr() );
257 257