From e23c4d8ff1cd15fd67bbc78a55092468cfb3ac47 Mon Sep 17 00:00:00 2001 From: Dennis Klein Date: Tue, 9 Jun 2026 19:57:45 +0200 Subject: [PATCH] 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 --- fairmq/Channel.cxx | 2 +- fairmq/DeviceRunner.cxx | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/fairmq/Channel.cxx b/fairmq/Channel.cxx index 4806e6e0..b3e3207c 100644 --- a/fairmq/Channel.cxx +++ b/fairmq/Channel.cxx @@ -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, -, _, [, ], #"; diff --git a/fairmq/DeviceRunner.cxx b/fairmq/DeviceRunner.cxx index e31eae5d..ee7d0dd1 100644 --- a/fairmq/DeviceRunner.cxx +++ b/fairmq/DeviceRunner.cxx @@ -65,11 +65,14 @@ 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 - << " / __/ / /_/ / / / _ / / / / /_/ / " << FAIRMQ_REPO_URL << endl - << " /_/ \\__,_/_/_/ /_/ /_/ \\___\\_\\ " << FAIRMQ_LICENSE << " © " << FAIRMQ_COPYRIGHT << endl; + << " ______ _ _______ _________ " << endl + << " / ____/___ _(_)_______ |/ /_ __ \\ version " + << FAIRMQ_GIT_VERSION << endl + << " / /_ / __ `/ / ___/__ /|_/ /_ / / / build " << FAIRMQ_BUILD_TYPE + << endl + << " / __/ / /_/ / / / _ / / / / /_/ / " << FAIRMQ_REPO_URL << endl + << R"( /_/ \__,_/_/_/ /_/ /_/ \___\_\ )" << FAIRMQ_LICENSE + << " © " << FAIRMQ_COPYRIGHT << endl; } }