Ignore:
Timestamp:
Apr 20, 2011, 4:58:05 PM (9 years ago)
Author:
tbretz
Message:
Moved the tools function into their own namespace to get rid of problems whenlinking with root.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/StateMachineImp.cc

    r10424 r10429  
    554554EventImp &StateMachineImp::AddTransition(int targetstate, const char *name, int s1, int s2, int s3, int s4, int s5)
    555555{
    556     return AddTransition(targetstate, name, Form("%d %d %d %d %d", s1, s2, s3, s4, s5).c_str(), "");
     556    return AddTransition(targetstate, name,
     557                         Tools::Form("%d %d %d %d %d", s1, s2, s3, s4, s5).c_str(), "");
    557558}
    558559
     
    586587EventImp &StateMachineImp::AddTransition(int targetstate, const char *name, const char *fmt, int s1, int s2, int s3, int s4, int s5)
    587588{
    588     return AddTransition(targetstate, name, Form("%d %d %d %d %d", s1, s2, s3, s4, s5).c_str(), fmt);
     589    return AddTransition(targetstate, name,
     590                         Tools::Form("%d %d %d %d %d", s1, s2, s3, s4, s5).c_str(), fmt);
    589591}
    590592
     
    701703{
    702704    const StateNames::const_iterator i = fStateNames.find(state);
    703     return i==fStateNames.end() || i->second.first.empty() ? Form("%d", state) : i->second.first;
     705    return i==fStateNames.end() || i->second.first.empty() ? Tools::Form("%d", state) : i->second.first;
    704706}
    705707
     
    737739{
    738740    const string &str = GetStateName(state);
    739     if (str==Form("%d", state))
     741    if (str==Tools::Form("%d", state))
    740742        return str;
    741     return str.empty() ? Form("%d", state) : (str+Form("[%d]", state));
     743    return str.empty() ? Tools::Form("%d", state) : (str+Tools::Form("[%d]", state));
    742744}
    743745
Note: See TracChangeset for help on using the changeset viewer.