Changeset 854 for code/branches/core/src/util/Convert.h
- Timestamp:
- Mar 5, 2008, 7:38:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core/src/util/Convert.h
r853 r854 226 226 return ConvertValue(output, input.getString()); 227 227 else 228 return false;228 return ConvertValue(output, (MultiTypePrimitive)input); 229 229 } 230 230 }; … … 240 240 return ConvertValue(output, input.getString()); 241 241 else 242 return false;242 return ConvertValue(output, (MultiTypePrimitive)input); 243 243 } 244 244 }; … … 264 264 return ConvertValue(output, input.getDegree()); 265 265 else 266 return false;266 return ConvertValue(output, (MultiTypeString)input); 267 267 } 268 268 }; … … 286 286 return ConvertValue(output, input.getDegree()); 287 287 else 288 return false;288 return ConvertValue(output, (MultiTypeString)input); 289 289 } 290 290 }; … … 397 397 bool operator()(orxonox::Vector2* output, const std::string& input) const 398 398 { 399 SubString tokens(input, ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0'); 399 unsigned int opening_parenthesis, closing_parenthesis = input.find(')'); 400 if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; } 401 402 SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0'); 400 403 401 404 if (tokens.size() >= 2) … … 420 423 bool operator()(orxonox::Vector3* output, const std::string& input) const 421 424 { 422 SubString tokens(input, ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0'); 425 unsigned int opening_parenthesis, closing_parenthesis = input.find(')'); 426 if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; } 427 428 SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0'); 423 429 424 430 if (tokens.size() >= 3) … … 445 451 bool operator()(orxonox::Vector4* output, const std::string& input) const 446 452 { 447 SubString tokens(input, ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0'); 453 unsigned int opening_parenthesis, closing_parenthesis = input.find(')'); 454 if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; } 455 456 SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0'); 448 457 449 458 if (tokens.size() >= 4) … … 472 481 bool operator()(orxonox::Quaternion* output, const std::string& input) const 473 482 { 474 SubString tokens(input, ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0'); 483 unsigned int opening_parenthesis, closing_parenthesis = input.find(')'); 484 if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; } 485 486 SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0'); 475 487 476 488 if (tokens.size() >= 4) … … 499 511 bool operator()(orxonox::ColourValue* output, const std::string& input) const 500 512 { 501 SubString tokens(input, ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0'); 513 unsigned int opening_parenthesis, closing_parenthesis = input.find(')'); 514 if ((opening_parenthesis = input.find('(')) == std::string::npos) { opening_parenthesis = 0; } else { opening_parenthesis++; } 515 516 SubString tokens(input.substr(opening_parenthesis, closing_parenthesis - opening_parenthesis), ",", SubString::WhiteSpaces, false, '\\', '"', '\0', '\0', '\0'); 502 517 503 518 if (tokens.size() >= 4)
Note: See TracChangeset
for help on using the changeset viewer.