From 8120c0cdd000a094b919dbfb1bd6b90e541fee63 Mon Sep 17 00:00:00 2001 From: marcel Date: Fri, 28 Jan 2022 13:58:47 +0100 Subject: [PATCH] fix this test by making a convert description --- include/yaml-cpp/node/convert.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/yaml-cpp/node/convert.h b/include/yaml-cpp/node/convert.h index 4182bd9..78f28e3 100644 --- a/include/yaml-cpp/node/convert.h +++ b/include/yaml-cpp/node/convert.h @@ -269,11 +269,11 @@ struct convert> { return node; } - static bool decode(const Node& node, std::unordered_map& rhs) { + static std::unordered_map decode(const Node& node) { if (!node.IsMap()) - return false; + BAD_DECODE_EXCEPTION - rhs.clear(); + std::unordered_map rhs; for (const auto& element : node) #if defined(__GNUC__) && __GNUC__ < 4 // workaround for GCC 3: @@ -281,7 +281,7 @@ struct convert> { #else rhs[element.first.as()] = element.second.as(); #endif - return true; + return rhs; } };