aboutsummaryrefslogtreecommitdiff
path: root/libbutl
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-04-04 07:24:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-04-04 07:24:37 +0200
commit6a899e04950c3ba62a238cf7a672a94df6cea527 (patch)
treed290e940534475c68a170cf2f50e62166ab1256f /libbutl
parent0a93d97fdfb09a47e555c9990b4083f0b3eabce7 (diff)
Add missing include to JSON serializer inline file
Diffstat (limited to 'libbutl')
-rw-r--r--libbutl/json/serializer.cxx6
-rw-r--r--libbutl/json/serializer.ixx8
2 files changed, 8 insertions, 6 deletions
diff --git a/libbutl/json/serializer.cxx b/libbutl/json/serializer.cxx
index 0e8b566..fbd569a 100644
--- a/libbutl/json/serializer.cxx
+++ b/libbutl/json/serializer.cxx
@@ -1,6 +1,6 @@
-#include <cstdio> // snprintf
-#include <cstdarg> // va_list
-#include <cstring> // memcpy
+#include <cstdio> // snprintf
+#include <cstdarg> // va_list
+#include <cstring> // memcpy
#include <ostream>
#include <libbutl/json/serializer.hxx>
diff --git a/libbutl/json/serializer.ixx b/libbutl/json/serializer.ixx
index ac6ea22..a719ef6 100644
--- a/libbutl/json/serializer.ixx
+++ b/libbutl/json/serializer.ixx
@@ -1,3 +1,5 @@
+#include <cstring> // strlen()
+
namespace butl
{
namespace json
@@ -72,7 +74,7 @@ namespace butl
inline void buffer_serializer::
member_name (const char* n, bool c)
{
- next (event::name, {n, n != nullptr ? strlen (n) : 0}, c);
+ next (event::name, {n, n != nullptr ? std::strlen (n) : 0}, c);
}
inline void buffer_serializer::
@@ -141,7 +143,7 @@ namespace butl
value (const char* v, bool c)
{
if (v != nullptr)
- next (event::string, {v, strlen (v)}, c);
+ next (event::string, {v, std::strlen (v)}, c);
else
next (event::null);
}
@@ -185,7 +187,7 @@ namespace butl
// Use event::number (which doesn't involve any quoting) with a disabled
// check.
//
- next (event::number, {v, strlen (v)}, false /* check */);
+ next (event::number, {v, std::strlen (v)}, false /* check */);
}
inline void buffer_serializer::