Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions 3 Framework/Core/include/Framework/TextControlService.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include "Framework/ControlService.h"
#include <string>
#include <string_view>
#include <regex>

namespace o2
Expand Down Expand Up @@ -44,7 +43,7 @@ class TextControlService : public ControlService
bool mOnce = false;
};

bool parseControl(std::string_view s, std::smatch& match);
bool parseControl(std::string const& s, std::smatch& match);

} // namespace framework
} // namespace o2
Expand Down
12 changes: 3 additions & 9 deletions 12 Framework/Core/src/TextControlService.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,10 @@ void TextControlService::readyToQuit(bool all)
}
}

bool parseControl(std::string_view s, std::smatch& match)
bool parseControl(std::string const& s, std::smatch& match)
{
const static std::regex controlRE("READY_TO_(QUIT)_(ME|ALL)", std::regex::optimize);
auto idx = s.find("CONTROL_ACTION: ");
if (idx == std::string::npos) {
return false;
}
s.remove_prefix(idx);
std::string rs{s};
return std::regex_search(rs, match, controlRE);
const static std::regex controlRE(".*CONTROL_ACTION: READY_TO_(QUIT)_(ME|ALL)", std::regex::optimize);
return std::regex_search(s, match, controlRE);
}

} // namespace framework
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.