summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libjsonpp/jsonpp.h2
-rw-r--r--libjsonpp/serialize.cpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/libjsonpp/jsonpp.h b/libjsonpp/jsonpp.h
index 1f70c88..7e84285 100644
--- a/libjsonpp/jsonpp.h
+++ b/libjsonpp/jsonpp.h
@@ -20,11 +20,13 @@ namespace json {
class Array;
using Value = std::variant<Null, String, Number, Object, Array, Boolean>;
using M = std::map<std::string, Value, std::less<>>;
+ // NOLINTNEXTLINE(misc-no-recursion)
class Object : public M {
public:
using M::M;
};
using A = std::vector<Value>;
+ // NOLINTNEXTLINE(misc-no-recursion)
class Array : public A {
public:
using A::A;
diff --git a/libjsonpp/serialize.cpp b/libjsonpp/serialize.cpp
index 8a2a25d..c757d40 100644
--- a/libjsonpp/serialize.cpp
+++ b/libjsonpp/serialize.cpp
@@ -15,6 +15,7 @@ namespace json {
;
}
void
+ // NOLINTNEXTLINE(misc-no-recursion)
operator()(const Value & v) const
{
std::visit(*this, v);
@@ -97,6 +98,7 @@ namespace json {
s << std::dec << n;
}
void
+ // NOLINTNEXTLINE(misc-no-recursion)
operator()(const Array & a) const
{
s << '[';
@@ -109,6 +111,7 @@ namespace json {
s << ']';
}
void
+ // NOLINTNEXTLINE(misc-no-recursion)
operator()(const Object & o) const
{
s << '{';