Changeset 10494 for trunk/FACT++


Ignore:
Timestamp:
04/29/11 12:50:46 (13 years ago)
Author:
tbretz
Message:
The new convention is to return always the server name in GetCommandList - removed the server name from the list.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/RemoteControl.h

    r10429 r10494  
    6565        str.append("/");
    6666    }
     67    static void chop(std::string &str)
     68    {
     69        const size_t p = str.find_first_of('/');
     70        if (p!=string::npos)
     71            str = str.substr(p+1);
     72    }
    6773
    6874    // This funtion defines which generator should be called.
     
    9096            }
    9197            else
    92                 return T::Complete(GetCommandList(fCurrentServer), text);
     98            {
     99                std::vector<std::string> v = GetCommandList(fCurrentServer);
     100                for_each(v.begin(), v.end(), RemoteControl::chop);
     101                return T::Complete(v, text);
     102            }
    93103        }
    94104        return T::Complete(GetCommandList(l), text);
Note: See TracChangeset for help on using the changeset viewer.