diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-12-31 00:13:13 -0700 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-12-31 00:13:13 -0700 |
commit | 55e6f570f5760e970c6523458914b5e4c63a6ce4 (patch) | |
tree | ae996d612c6c55b914a960139a618922bf7e4971 /src/variable.cpp | |
parent | 3357b0a0ecc4d36ccd3c2668e9d55aaaefedf4df (diff) | |
download | stage-55e6f570f5760e970c6523458914b5e4c63a6ce4.tar.gz stage-55e6f570f5760e970c6523458914b5e4c63a6ce4.tar.bz2 stage-55e6f570f5760e970c6523458914b5e4c63a6ce4.tar.xz stage-55e6f570f5760e970c6523458914b5e4c63a6ce4.zip |
Random function added, other fixes.
Diffstat (limited to 'src/variable.cpp')
-rw-r--r-- | src/variable.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/variable.cpp b/src/variable.cpp index 5296848..a3fb4a2 100644 --- a/src/variable.cpp +++ b/src/variable.cpp | |||
@@ -242,8 +242,15 @@ bool Variable::has( const Variable &vKey ) | |||
242 | { | 242 | { |
243 | if( eType == tDictionary ) | 243 | if( eType == tDictionary ) |
244 | return hValue->has( vKey ); | 244 | return hValue->has( vKey ); |
245 | // else if( eType == tList ) | 245 | else if( eType == tList ) |
246 | // return lValue->contains( vKey ); | 246 | { |
247 | for( VariableList::const_iterator i = lValue->begin(); i; i++ ) | ||
248 | { | ||
249 | if( (*i) == vKey ) | ||
250 | return true; | ||
251 | } | ||
252 | return false; | ||
253 | } | ||
247 | else | 254 | else |
248 | throw Bu::ExceptionBase("Insert on non-dictionary."); | 255 | throw Bu::ExceptionBase("Insert on non-dictionary."); |
249 | } | 256 | } |