Skip to content

Commit

Permalink
Do not modernize string literals.
Browse files Browse the repository at this point in the history
They cause errors with older versions of cppcheck
  • Loading branch information
rbost committed Dec 21, 2018
1 parent 0f50420 commit 40b6771
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
Checks: 'clang-diagnostic-*,-clang-diagnostic-#warnings,-clang-diagnostic-#pragma-messages,modernize-*,-modernize-use-auto,-modernize-make-unique,bugprone-*, readability-*,-readability-avoid-const-params-in-decls,misc-*,-misc-unused-parameters,performance-*,cert-*,-cert-err60-cpp,google-*,-google-runtime-references,llvm-*,-llvm-header-guard'
Checks: 'clang-diagnostic-*,-clang-diagnostic-#warnings,-clang-diagnostic-#pragma-messages,modernize-*,-modernize-use-auto,-modernize-make-unique,-smodernize-raw-string-literal,bugprone-*, readability-*,-readability-avoid-const-params-in-decls,misc-*,-misc-unused-parameters,performance-*,cert-*,-cert-err60-cpp,google-*,-google-runtime-references,llvm-*,-llvm-header-guard'
WarningsAsErrors: ''
HeaderFilterRegex: 'sse/(runners|schemes)/.*'
AnalyzeTemporaryDtors: false
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ Benchmark::~Benchmark()
}

constexpr auto search_JSON_begin
= R"({{ "message" : ")"; // double { to escape it in fmt
= "{{ \"message\" : \""; // double { to escape it in fmt
constexpr auto search_JSON_end
= R"(", "items" : {0}, "time" : {1}, "time/item" : {2} }})";
= "\", \"items\" : {0}, \"time\" : {1}, \"time/item\" : {2} }}";

SearchBenchmark::SearchBenchmark(std::string message)
: Benchmark(search_JSON_begin + std::move(message) + search_JSON_end)
Expand Down

0 comments on commit 40b6771

Please sign in to comment.