Changeset 7284 for code/trunk/src/libraries/util/Math.cc
- Timestamp:
- Aug 31, 2010, 3:37:40 AM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/util/Math.cc
r7184 r7284 234 234 bool ConverterFallback<std::string, orxonox::Vector2>::convert(orxonox::Vector2* output, const std::string& input) 235 235 { 236 size_t opening_parenthesis, closing_parenthesis = input.find(' )');237 if ((opening_parenthesis = input.find(' (')) == std::string::npos)236 size_t opening_parenthesis, closing_parenthesis = input.find('}'); 237 if ((opening_parenthesis = input.find('{')) == std::string::npos) 238 238 opening_parenthesis = 0; 239 239 else … … 257 257 bool ConverterFallback<std::string, orxonox::Vector3>::convert(orxonox::Vector3* output, const std::string& input) 258 258 { 259 size_t opening_parenthesis, closing_parenthesis = input.find(' )');260 if ((opening_parenthesis = input.find(' (')) == std::string::npos)259 size_t opening_parenthesis, closing_parenthesis = input.find('}'); 260 if ((opening_parenthesis = input.find('{')) == std::string::npos) 261 261 opening_parenthesis = 0; 262 262 else … … 282 282 bool ConverterFallback<std::string, orxonox::Vector4>::convert(orxonox::Vector4* output, const std::string& input) 283 283 { 284 size_t opening_parenthesis, closing_parenthesis = input.find(' )');285 if ((opening_parenthesis = input.find(' (')) == std::string::npos)284 size_t opening_parenthesis, closing_parenthesis = input.find('}'); 285 if ((opening_parenthesis = input.find('{')) == std::string::npos) 286 286 opening_parenthesis = 0; 287 287 else … … 309 309 bool ConverterFallback<std::string, orxonox::Quaternion>::convert(orxonox::Quaternion* output, const std::string& input) 310 310 { 311 size_t opening_parenthesis, closing_parenthesis = input.find(')'); 312 if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; } 311 size_t opening_parenthesis, closing_parenthesis = input.find('}'); 312 if ((opening_parenthesis = input.find('{')) == std::string::npos) 313 opening_parenthesis = 0; 314 else 315 opening_parenthesis++; 313 316 314 317 SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', true, '"', true, '\0', '\0', true, '\0'); … … 332 335 bool ConverterFallback<std::string, orxonox::ColourValue>::convert(orxonox::ColourValue* output, const std::string& input) 333 336 { 334 size_t opening_parenthesis, closing_parenthesis = input.find(')'); 335 if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; } 337 size_t opening_parenthesis, closing_parenthesis = input.find('}'); 338 if ((opening_parenthesis = input.find('{')) == std::string::npos) 339 opening_parenthesis = 0; 340 else 341 opening_parenthesis++; 336 342 337 343 SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', true, '"', true, '\0', '\0', true, '\0');
Note: See TracChangeset
for help on using the changeset viewer.