mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
Apply performance-faster-string-find
This commit is contained in:
parent
ca3e67d95d
commit
abf7bdcdd4
|
@ -169,7 +169,7 @@ unordered_map<string, int> ProgOptions::GetChannelInfoImpl() const
|
|||
for (const auto& m : fVarMap) {
|
||||
if (boost::regex_match(m.first, re)) {
|
||||
string chan = m.first.substr(6);
|
||||
string::size_type n = chan.find(".");
|
||||
string::size_type n = chan.find('.');
|
||||
string chanName = chan.substr(0, n);
|
||||
|
||||
if (info.find(chanName) == info.end()) {
|
||||
|
|
|
@ -222,9 +222,9 @@ struct Machine_ : public state_machine_def<Machine_>
|
|||
bmpl::for_each<AllStates, wrap<bmpl::placeholders::_1>>(get_state_name<RecursiveStt>(stateName, state));
|
||||
|
||||
stateName = boost::core::demangle(stateName.c_str());
|
||||
size_t pos = stateName.rfind(":");
|
||||
size_t pos = stateName.rfind(':');
|
||||
stateName = stateName.substr(pos + 1);
|
||||
size_t pos2 = stateName.rfind("_");
|
||||
size_t pos2 = stateName.rfind('_');
|
||||
stateName = stateName.substr(0, pos2);
|
||||
|
||||
if (stateName != "OK") {
|
||||
|
|
Loading…
Reference in New Issue
Block a user