Changeset 218 for osgVisual/trunk/src/util
- Timestamp:
- Feb 2, 2011, 9:36:49 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/src/util/visual_util.cpp
r198 r218 535 535 return animationpath; 536 536 } 537 538 int util::strToDouble(std::string s) 539 { 540 double tmp; 541 std::stringstream sstr(s); 542 sstr >> tmp; 543 return tmp; 544 } 545 546 double util::strToInt(std::string s) 547 { 548 int tmp; 549 std::stringstream sstr(s); 550 sstr >> tmp; 551 return tmp; 552 } 553 554 bool util::strToBool(std::string s) 555 { 556 if(s=="yes") 557 return(true); 558 if(s=="no") 559 return(false); 560 OSG_ALWAYS << __FUNCTION__ << "Warning:Unable to convert "<< s <<" to bool, using false as default!" << std::endl; 561 return(false); 562 }
Note: See TracChangeset
for help on using the changeset viewer.