Changeset 10309 for trunk/FACT++/src/StateMachineImp.cc
- Timestamp:
- 04/07/11 15:46:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/StateMachineImp.cc
r10300 r10309 650 650 //! as string. 651 651 //! 652 const string StateMachineImp::GetStateName(int state) /*const*/653 { 654 const string &str = fStateNames[state].first;655 return str.empty() ? Form("%d", state) : str;652 const string StateMachineImp::GetStateName(int state) const 653 { 654 const StateNames::const_iterator i = fStateNames.find(state); 655 return i==fStateNames.end() || i->second.first.empty() ? Form("%d", state) : i->second.first; 656 656 } 657 657 … … 666 666 //! returned. 667 667 //! 668 const string StateMachineImp::GetStateDesc(int state) /*const*/ 669 { 670 return fStateNames[state].second; 668 const string StateMachineImp::GetStateDesc(int state) const 669 { 670 const StateNames::const_iterator i = fStateNames.find(state); 671 return i==fStateNames.end() ? "" : i->second.second; 671 672 } 672 673 … … 685 686 //! 686 687 // 687 const string StateMachineImp::GetStateDescription(int state) /*const*/688 const string StateMachineImp::GetStateDescription(int state) const 688 689 { 689 690 const string &str = GetStateName(state);
Note:
See TracChangeset
for help on using the changeset viewer.