From 3c4c69a24ee050b8ae5e6c785c5c2474bc322f50 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 21 Jul 2019 13:56:13 +0200 Subject: [PATCH] :rotating_light: fix linter warning --- include/nlohmann/detail/input/binary_reader.hpp | 11 +++-------- single_include/nlohmann/json.hpp | 11 +++-------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/include/nlohmann/detail/input/binary_reader.hpp b/include/nlohmann/detail/input/binary_reader.hpp index 42976d70..65549409 100644 --- a/include/nlohmann/detail/input/binary_reader.hpp +++ b/include/nlohmann/detail/input/binary_reader.hpp @@ -1082,6 +1082,9 @@ class binary_reader case 0xBD: case 0xBE: case 0xBF: + case 0xD9: // str 8 + case 0xDA: // str 16 + case 0xDB: // str 32 { string_t s; return get_msgpack_string(s) and sax->string(s); @@ -1156,14 +1159,6 @@ class binary_reader return get_number(input_format_t::msgpack, number) and sax->number_integer(number); } - case 0xD9: // str 8 - case 0xDA: // str 16 - case 0xDB: // str 32 - { - string_t s; - return get_msgpack_string(s) and sax->string(s); - } - case 0xDC: // array 16 { std::uint16_t len; diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 5003a4fa..24dd652a 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -4590,6 +4590,9 @@ class binary_reader case 0xBD: case 0xBE: case 0xBF: + case 0xD9: // str 8 + case 0xDA: // str 16 + case 0xDB: // str 32 { string_t s; return get_msgpack_string(s) and sax->string(s); @@ -4664,14 +4667,6 @@ class binary_reader return get_number(input_format_t::msgpack, number) and sax->number_integer(number); } - case 0xD9: // str 8 - case 0xDA: // str 16 - case 0xDB: // str 32 - { - string_t s; - return get_msgpack_string(s) and sax->string(s); - } - case 0xDC: // array 16 { std::uint16_t len;