summaryrefslogtreecommitdiff
path: root/include/json_html_serializer.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-01-07 20:28:45 +0300
committerEd Tanous <ed@tanous.net>2022-01-12 22:00:37 +0300
commitca45aa3c416e55027b8d17078bac6493e81d564f (patch)
tree6b23f35cfba77f66557e78230b85684cef0f5c04 /include/json_html_serializer.hpp
parent46ff87bade273c75f71f940c5770d30e7a29595b (diff)
downloadbmcweb-ca45aa3c416e55027b8d17078bac6493e81d564f.tar.xz
Enable checks for pointer arithmetic
Quite a few places we've disobeyed this rule, so simply ignore them for now to avoid new issues popping up. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I3e518a8e8742279afb3ad1a9dad54006ed109fb1
Diffstat (limited to 'include/json_html_serializer.hpp')
-rw-r--r--include/json_html_serializer.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/json_html_serializer.hpp b/include/json_html_serializer.hpp
index 3efc224444..4969d27278 100644
--- a/include/json_html_serializer.hpp
+++ b/include/json_html_serializer.hpp
@@ -353,6 +353,7 @@ void dumpInteger(std::string& out, NumberType number)
// jump to the end to generate the string from backward
// so we later avoid reversing the result
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
bufferPtr += nChars;
// Fast int2ascii implementation inspired by "Fastware" talk by Andrei
@@ -384,6 +385,8 @@ inline void dumpfloat(std::string& out, double number,
{
std::array<char, 64> numberbuffer{{}};
char* begin = numberbuffer.data();
+
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
::nlohmann::detail::to_chars(begin, begin + numberbuffer.size(), number);
out += begin;