Module: check_mk
Branch: master
Commit: 2408c2937fbfffab879a804423bb4c88c3ade53b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2408c2937fbfff…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Aug 10 16:44:58 2016 +0200
Workaround for a cppcheck bug regarding raw string literals.
clang-tidy recommends raw string literals, which is fine in itself. Alas,
current cppcheck versions use a somehow naive preprocessor which can't
handle them. :-P Workaround for now: Tell clang-tidy that our normal,
escaped string literals are OK. *sigh*...
---
livestatus/src/Renderer.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/livestatus/src/Renderer.cc b/livestatus/src/Renderer.cc
index a85a110..be8068d 100644
--- a/livestatus/src/Renderer.cc
+++ b/livestatus/src/Renderer.cc
@@ -117,7 +117,7 @@ void Renderer::output(double value) {
void Renderer::output(char16_t value) {
ostringstream os;
- os << R"(\u)" << hex << setw(4) <<
setfill('0') << value;
+ os << "\\u" << hex << setw(4) <<
setfill('0') << value; // NOLINT
add(os.str());
}
@@ -174,7 +174,7 @@ void Renderer::outputDecodedLatin1(const string &prefix, const
char *start,
void Renderer::outputDecoded(const string &prefix, const char *start,
const char *end, Encoding data_encoding) {
add(prefix);
- add(R"(")"); // "
+ add("\""); // NOLINT
// TODO(sp) Use polymorphism instead of switch.
// TODO(sp) Use codecvt framework instead of homemade stuff.
switch (data_encoding) {
@@ -188,7 +188,7 @@ void Renderer::outputDecoded(const string &prefix, const char
*start,
outputDecodedMixed(start, end);
break;
}
- add(R"(")"); // "
+ add("\""); // NOLINT
}
void Renderer::outputDecodedUTF8(const char *start, const char *end) {