Files
allwpilib/upstream_utils/json_patches/0003-Make-dump_escaped-take-std-string_view.patch
2026-01-02 08:51:16 -08:00

23 lines
948 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tyler Veness <calcmogul@gmail.com>
Date: Fri, 8 Sep 2023 21:42:01 -0700
Subject: [PATCH 3/5] Make dump_escaped() take std::string_view
---
include/nlohmann/detail/output/serializer.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/nlohmann/detail/output/serializer.hpp b/include/nlohmann/detail/output/serializer.hpp
index 3a8e6c18f64035670886089c924bd322acc673a8..359eb82071b10e45e45f73f458660c4e44dd86e8 100644
--- a/include/nlohmann/detail/output/serializer.hpp
+++ b/include/nlohmann/detail/output/serializer.hpp
@@ -388,7 +388,7 @@ class serializer
@complexity Linear in the length of string @a s.
*/
- void dump_escaped(const string_t& s, const bool ensure_ascii)
+ void dump_escaped(std::string_view s, const bool ensure_ascii)
{
std::uint32_t codepoint{};
std::uint8_t state = UTF8_ACCEPT;