aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-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