Apply performance-faster-string-find

This commit is contained in:
Alexey Rybalchenko
2021-09-13 12:22:57 +02:00
committed by Dennis Klein
parent f33c597f34
commit 310204a89d
2 changed files with 3 additions and 3 deletions

View File

@@ -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") {