style: use raw string literals for escaped strings

- replace string literals containing many escaped characters with raw
  string literals
- clang-tidy modernize-raw-string-literal
  https://clang.llvm.org/extra/clang-tidy/checks/modernize/raw-string-literal.html
This commit is contained in:
Dennis Klein
2026-06-09 19:57:45 +02:00
committed by Dennis Klein
parent 8ab00ecddc
commit e23c4d8ff1
2 changed files with 9 additions and 6 deletions

View File

@@ -181,7 +181,7 @@ try {
// validate channel name
smatch m;
if (regex_search(fName, m, regex("[^a-zA-Z0-9\\-_\\[\\]#]"))) {
if (regex_search(fName, m, regex(R"([^a-zA-Z0-9\-_\[\]#])"))) {
ss << "INVALID";
LOG(debug) << ss.str();
LOG(error) << "channel name contains illegal character: '" << m.str(0) << "', allowed characters are: a-z, A-Z, 0-9, -, _, [, ], #";

View File

@@ -66,10 +66,13 @@ bool DeviceRunner::HandleGeneralOptions(const fair::mq::ProgOptions& config, boo
if (printLogo) {
LOG(info) << endl
<< " ______ _ _______ _________ " << endl
<< " / ____/___ _(_)_______ |/ /_ __ \\ version " << FAIRMQ_GIT_VERSION << endl
<< " / /_ / __ `/ / ___/__ /|_/ /_ / / / build " << FAIRMQ_BUILD_TYPE << endl
<< " / ____/___ _(_)_______ |/ /_ __ \\ version "
<< FAIRMQ_GIT_VERSION << endl
<< " / /_ / __ `/ / ___/__ /|_/ /_ / / / build " << FAIRMQ_BUILD_TYPE
<< endl
<< " / __/ / /_/ / / / _ / / / / /_/ / " << FAIRMQ_REPO_URL << endl
<< " /_/ \\__,_/_/_/ /_/ /_/ \\___\\_\\ " << FAIRMQ_LICENSE << " © " << FAIRMQ_COPYRIGHT << endl;
<< R"( /_/ \__,_/_/_/ /_/ /_/ \___\_\ )" << FAIRMQ_LICENSE
<< " © " << FAIRMQ_COPYRIGHT << endl;
}
}