Skip to content

Commit 02cdcba

Browse files
committed
Fix clazy
1 parent 9049618 commit 02cdcba

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/test/controller_mapping_validation_test.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
#endif
2424
#include "moc_controller_mapping_validation_test.cpp"
2525

26+
namespace {
27+
const QRegularExpression kNonWordPattern(QStringLiteral("[^\\w]+"));
28+
}
29+
2630
FakeMidiControllerJSProxy::FakeMidiControllerJSProxy()
2731
: ControllerJSProxy(nullptr) {
2832
}
@@ -248,7 +252,7 @@ bool lintMappingInfo(const MappingInfo& mapping) {
248252

249253
std::string PrintMappingName(const ::testing::TestParamInfo<std::string>& info) {
250254
auto name = QFileInfo(QString::fromStdString(info.param));
251-
return name.fileName().replace(QRegularExpression("[^\\w]+"), "_").toStdString();
255+
return name.fileName().replace(kNonWordPattern, "_").toStdString();
252256
}
253257

254258
// Inhibit the output of the mapping info to avoid spamming the console

0 commit comments

Comments
 (0)