From c970f5ae6688defb22b37b8e1f3ae16a00f9731b Mon Sep 17 00:00:00 2001 From: Jonathan Windgassen <j.windgassen@fz-juelich.de> Date: Tue, 9 Nov 2021 15:22:39 +0100 Subject: [PATCH] Updated yaml-cpp to newest commit --- README.md | 2 ++ Source/UnrealYAML/UnrealYAML.Build.cs | 8 ++--- Source/UnrealYAML/yaml-cpp/include/binary.h | 2 +- Source/UnrealYAML/yaml-cpp/include/dll.h | 33 ------------------- Source/UnrealYAML/yaml-cpp/include/emitter.h | 2 +- .../UnrealYAML/yaml-cpp/include/exceptions.h | 2 +- Source/UnrealYAML/yaml-cpp/include/mark.h | 2 +- .../yaml-cpp/include/node/convert.h | 8 ++--- .../yaml-cpp/include/node/detail/iterator.h | 2 +- .../include/node/detail/iterator_fwd.h | 2 +- .../yaml-cpp/include/node/detail/memory.h | 2 +- .../yaml-cpp/include/node/detail/node.h | 11 +++---- .../yaml-cpp/include/node/detail/node_data.h | 2 +- .../include/node/detail/node_iterator.h | 2 +- .../yaml-cpp/include/node/detail/node_ref.h | 2 +- .../UnrealYAML/yaml-cpp/include/node/emit.h | 2 +- .../UnrealYAML/yaml-cpp/include/node/impl.h | 2 +- .../yaml-cpp/include/node/iterator.h | 5 ++- .../UnrealYAML/yaml-cpp/include/node/node.h | 2 +- .../UnrealYAML/yaml-cpp/include/node/parse.h | 2 +- Source/UnrealYAML/yaml-cpp/include/node/ptr.h | 2 +- Source/UnrealYAML/yaml-cpp/include/null.h | 2 +- .../yaml-cpp/include/ostream_wrapper.h | 2 +- Source/UnrealYAML/yaml-cpp/include/parser.h | 2 -- Source/UnrealYAML/yaml-cpp/src/binary.cpp | 2 +- .../yaml-cpp/src/contrib/graphbuilder.cpp | 3 +- .../yaml-cpp/src/{node => }/depthguard.cpp | 0 .../yaml-cpp/src/{node => }/emit.cpp | 0 .../UnrealYAML/yaml-cpp/src/emitterutils.cpp | 4 +-- .../yaml-cpp/src/{node/detail => }/memory.cpp | 0 .../yaml-cpp/src/{node => }/node.cpp | 0 .../src/{node/detail => }/node_data.cpp | 2 ++ .../yaml-cpp/src/{node => }/parse.cpp | 0 Source/UnrealYAML/yaml-cpp/src/regex_yaml.h | 2 +- Source/UnrealYAML/yaml-cpp/src/scantoken.cpp | 6 ++-- .../yaml-cpp/src/singledocparser.cpp | 7 ++-- 36 files changed, 50 insertions(+), 79 deletions(-) delete mode 100644 Source/UnrealYAML/yaml-cpp/include/dll.h rename Source/UnrealYAML/yaml-cpp/src/{node => }/depthguard.cpp (100%) rename Source/UnrealYAML/yaml-cpp/src/{node => }/emit.cpp (100%) rename Source/UnrealYAML/yaml-cpp/src/{node/detail => }/memory.cpp (100%) rename Source/UnrealYAML/yaml-cpp/src/{node => }/node.cpp (100%) rename Source/UnrealYAML/yaml-cpp/src/{node/detail => }/node_data.cpp (99%) rename Source/UnrealYAML/yaml-cpp/src/{node => }/parse.cpp (100%) diff --git a/README.md b/README.md index 0326681..14ac232 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Welcome to the UnrealYAML Plugin, a Plugin that allows the parsing and emitting of YAML files, based on the [yaml-cpp Library](https://github.com/jbeder/yaml-cpp) +**Current yaml-cpp base commit:** [328d2d8](https://github.com/jbeder/yaml-cpp/commit/328d2d85e833be7cb5a0ab246cc3f5d7e16fc67a) + **Important Node:** The Plugin is far from finished and needs more testing, bug fixing and features to become fully usable and to work natively in Unreal! Feel free to contribute ## Tutorial diff --git a/Source/UnrealYAML/UnrealYAML.Build.cs b/Source/UnrealYAML/UnrealYAML.Build.cs index bd4dbd9..b9df917 100644 --- a/Source/UnrealYAML/UnrealYAML.Build.cs +++ b/Source/UnrealYAML/UnrealYAML.Build.cs @@ -10,11 +10,9 @@ public class UnrealYAML : ModuleRules { bEnableExceptions = true; bUseRTTI = true; - - if (Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64) { - PublicDefinitions.Add("YAML_CPP_DLL=1"); - PublicDefinitions.Add("yaml_cpp_EXPORTS=1"); - } + + // Replace the source ExportHeader with our ExportHeader + PublicDefinitions.Add("YAML_CPP_API=UNREALYAML_API"); PublicIncludePaths.Add(Path.Combine(PluginDirectory, "Source", "UnrealYAML", "yaml-cpp", "include")); PrivateIncludePaths.Add(Path.Combine(PluginDirectory, "Source", "UnrealYAML","yaml-cpp", "src")); diff --git a/Source/UnrealYAML/yaml-cpp/include/binary.h b/Source/UnrealYAML/yaml-cpp/include/binary.h index 40216c7..1872489 100644 --- a/Source/UnrealYAML/yaml-cpp/include/binary.h +++ b/Source/UnrealYAML/yaml-cpp/include/binary.h @@ -10,7 +10,7 @@ #include <string> #include <vector> -#include "dll.h" + namespace YAML { YAML_CPP_API std::string EncodeBase64(const unsigned char *data, diff --git a/Source/UnrealYAML/yaml-cpp/include/dll.h b/Source/UnrealYAML/yaml-cpp/include/dll.h deleted file mode 100644 index e3306b3..0000000 --- a/Source/UnrealYAML/yaml-cpp/include/dll.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 -#define DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 - -#if defined(_MSC_VER) || \ - (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \ - (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4 -#pragma once -#endif - -// The following ifdef block is the standard way of creating macros which make -// exporting from a DLL simpler. All files within this DLL are compiled with the -// yaml_cpp_EXPORTS symbol defined on the command line. This symbol should not -// be defined on any project that uses this DLL. This way any other project -// whose source files include this file see YAML_CPP_API functions as being -// imported from a DLL, whereas this DLL sees symbols defined with this macro as -// being exported. -#undef YAML_CPP_API - -#ifdef YAML_CPP_DLL // Using or Building YAML-CPP DLL (definition defined - // manually) - #ifdef yaml_cpp_EXPORTS // Building YAML-CPP DLL (definition created by CMake - // or defined manually) - // #pragma message( "Defining YAML_CPP_API for DLL export" ) - #define YAML_CPP_API __declspec(dllexport) - #else // yaml_cpp_EXPORTS - // #pragma message( "Defining YAML_CPP_API for DLL import" ) - #define YAML_CPP_API __declspec(dllimport) - #endif // yaml_cpp_EXPORTS -#else // YAML_CPP_DLL -#define YAML_CPP_API -#endif // YAML_CPP_DLL - -#endif // DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 diff --git a/Source/UnrealYAML/yaml-cpp/include/emitter.h b/Source/UnrealYAML/yaml-cpp/include/emitter.h index a393c04..d7bcd1c 100644 --- a/Source/UnrealYAML/yaml-cpp/include/emitter.h +++ b/Source/UnrealYAML/yaml-cpp/include/emitter.h @@ -16,7 +16,7 @@ #include <type_traits> #include "binary.h" -#include "dll.h" + #include "emitterdef.h" #include "emittermanip.h" #include "null.h" diff --git a/Source/UnrealYAML/yaml-cpp/include/exceptions.h b/Source/UnrealYAML/yaml-cpp/include/exceptions.h index 4e4aef8..a3f9c6c 100644 --- a/Source/UnrealYAML/yaml-cpp/include/exceptions.h +++ b/Source/UnrealYAML/yaml-cpp/include/exceptions.h @@ -65,7 +65,7 @@ const char* const ZERO_INDENT_IN_BLOCK = const char* const CHAR_IN_BLOCK = "unexpected character in block scalar"; const char* const AMBIGUOUS_ANCHOR = "cannot assign the same alias to multiple nodes"; -const char* const UNKNOWN_ANCHOR = "the referenced anchor is not defined"; +const char* const UNKNOWN_ANCHOR = "the referenced anchor is not defined: "; const char* const INVALID_NODE = "invalid node; this may result from using a map iterator as a sequence " diff --git a/Source/UnrealYAML/yaml-cpp/include/mark.h b/Source/UnrealYAML/yaml-cpp/include/mark.h index 8ba7dfa..8a14269 100644 --- a/Source/UnrealYAML/yaml-cpp/include/mark.h +++ b/Source/UnrealYAML/yaml-cpp/include/mark.h @@ -7,7 +7,7 @@ #pragma once #endif -#include "dll.h" + namespace YAML { struct YAML_CPP_API Mark { diff --git a/Source/UnrealYAML/yaml-cpp/include/node/convert.h b/Source/UnrealYAML/yaml-cpp/include/node/convert.h index 7b3ba27..c7b6f62 100644 --- a/Source/UnrealYAML/yaml-cpp/include/node/convert.h +++ b/Source/UnrealYAML/yaml-cpp/include/node/convert.h @@ -226,16 +226,16 @@ struct convert<bool> { }; // std::map -template <typename K, typename V, typename CP, typename A> -struct convert<std::map<K, V, CP, A>> { - static Node encode(const std::map<K, V, CP, A>& rhs) { +template <typename K, typename V, typename C, typename A> +struct convert<std::map<K, V, C, A>> { + static Node encode(const std::map<K, V, C, A>& rhs) { Node node(NodeType::Map); for (const auto& element : rhs) node.force_insert(element.first, element.second); return node; } - static bool decode(const Node& node, std::map<K, V, CP, A>& rhs) { + static bool decode(const Node& node, std::map<K, V, C, A>& rhs) { if (!node.IsMap()) return false; diff --git a/Source/UnrealYAML/yaml-cpp/include/node/detail/iterator.h b/Source/UnrealYAML/yaml-cpp/include/node/detail/iterator.h index 5ed58af..dad6caa 100644 --- a/Source/UnrealYAML/yaml-cpp/include/node/detail/iterator.h +++ b/Source/UnrealYAML/yaml-cpp/include/node/detail/iterator.h @@ -7,7 +7,7 @@ #pragma once #endif -#include "dll.h" + #include "node/detail/node_iterator.h" #include "node/node.h" #include "node/ptr.h" diff --git a/Source/UnrealYAML/yaml-cpp/include/node/detail/iterator_fwd.h b/Source/UnrealYAML/yaml-cpp/include/node/detail/iterator_fwd.h index bb90adc..002999f 100644 --- a/Source/UnrealYAML/yaml-cpp/include/node/detail/iterator_fwd.h +++ b/Source/UnrealYAML/yaml-cpp/include/node/detail/iterator_fwd.h @@ -7,7 +7,7 @@ #pragma once #endif -#include "dll.h" + #include <list> #include <utility> #include <vector> diff --git a/Source/UnrealYAML/yaml-cpp/include/node/detail/memory.h b/Source/UnrealYAML/yaml-cpp/include/node/detail/memory.h index 1e26090..fb49e88 100644 --- a/Source/UnrealYAML/yaml-cpp/include/node/detail/memory.h +++ b/Source/UnrealYAML/yaml-cpp/include/node/detail/memory.h @@ -9,7 +9,7 @@ #include <set> -#include "dll.h" + #include "node/ptr.h" namespace YAML { diff --git a/Source/UnrealYAML/yaml-cpp/include/node/detail/node.h b/Source/UnrealYAML/yaml-cpp/include/node/detail/node.h index dd1fc4e..056bcee 100644 --- a/Source/UnrealYAML/yaml-cpp/include/node/detail/node.h +++ b/Source/UnrealYAML/yaml-cpp/include/node/detail/node.h @@ -7,7 +7,7 @@ #pragma once #endif -#include "dll.h" + #include "emitterstyle.h" #include "node/detail/node_ref.h" #include "node/ptr.h" @@ -18,12 +18,12 @@ namespace YAML { namespace detail { class node { -private: + private: struct less { bool operator ()(const node* l, const node* r) const {return l->m_index < r->m_index;} }; -public: + public: node() : m_pRef(new node_ref), m_dependencies{}, m_index{} {} node(const node&) = delete; node& operator=(const node&) = delete; @@ -164,16 +164,13 @@ public: m_pRef->force_insert(key, value, pMemory); } -private: + private: shared_node_ref m_pRef; using nodes = std::set<node*, less>; nodes m_dependencies; size_t m_index; static YAML_CPP_API std::atomic<size_t> m_amount; }; - -std::atomic<size_t> node::m_amount{ 0 }; - } // namespace detail } // namespace YAML diff --git a/Source/UnrealYAML/yaml-cpp/include/node/detail/node_data.h b/Source/UnrealYAML/yaml-cpp/include/node/detail/node_data.h index 6683d6d..9563aa8 100644 --- a/Source/UnrealYAML/yaml-cpp/include/node/detail/node_data.h +++ b/Source/UnrealYAML/yaml-cpp/include/node/detail/node_data.h @@ -13,7 +13,7 @@ #include <utility> #include <vector> -#include "dll.h" + #include "node/detail/node_iterator.h" #include "node/iterator.h" #include "node/ptr.h" diff --git a/Source/UnrealYAML/yaml-cpp/include/node/detail/node_iterator.h b/Source/UnrealYAML/yaml-cpp/include/node/detail/node_iterator.h index dbaa040..aa625f2 100644 --- a/Source/UnrealYAML/yaml-cpp/include/node/detail/node_iterator.h +++ b/Source/UnrealYAML/yaml-cpp/include/node/detail/node_iterator.h @@ -7,7 +7,7 @@ #pragma once #endif -#include "dll.h" + #include "node/ptr.h" #include <cstddef> #include <iterator> diff --git a/Source/UnrealYAML/yaml-cpp/include/node/detail/node_ref.h b/Source/UnrealYAML/yaml-cpp/include/node/detail/node_ref.h index e6eaaea..3137a59 100644 --- a/Source/UnrealYAML/yaml-cpp/include/node/detail/node_ref.h +++ b/Source/UnrealYAML/yaml-cpp/include/node/detail/node_ref.h @@ -7,7 +7,7 @@ #pragma once #endif -#include "dll.h" + #include "node/type.h" #include "node/ptr.h" #include "node/detail/node_data.h" diff --git a/Source/UnrealYAML/yaml-cpp/include/node/emit.h b/Source/UnrealYAML/yaml-cpp/include/node/emit.h index a0280db..f15580e 100644 --- a/Source/UnrealYAML/yaml-cpp/include/node/emit.h +++ b/Source/UnrealYAML/yaml-cpp/include/node/emit.h @@ -10,7 +10,7 @@ #include <string> #include <iosfwd> -#include "dll.h" + namespace YAML { class Emitter; diff --git a/Source/UnrealYAML/yaml-cpp/include/node/impl.h b/Source/UnrealYAML/yaml-cpp/include/node/impl.h index ee0acad..07f02b5 100644 --- a/Source/UnrealYAML/yaml-cpp/include/node/impl.h +++ b/Source/UnrealYAML/yaml-cpp/include/node/impl.h @@ -42,7 +42,7 @@ inline Node::Node(const detail::iterator_value& rhs) m_pMemory(rhs.m_pMemory), m_pNode(rhs.m_pNode) {} -inline Node::Node(const Node& rhs) = default; +inline Node::Node(const Node&) = default; inline Node::Node(Zombie) : m_isValid(false), m_invalidKey{}, m_pMemory{}, m_pNode(nullptr) {} diff --git a/Source/UnrealYAML/yaml-cpp/include/node/iterator.h b/Source/UnrealYAML/yaml-cpp/include/node/iterator.h index 607cc86..3f73e19 100644 --- a/Source/UnrealYAML/yaml-cpp/include/node/iterator.h +++ b/Source/UnrealYAML/yaml-cpp/include/node/iterator.h @@ -7,7 +7,7 @@ #pragma once #endif -#include "dll.h" + #include "node/node.h" #include "node/detail/iterator_fwd.h" #include "node/detail/iterator.h" @@ -15,6 +15,9 @@ #include <utility> #include <vector> +// Assert in place so gcc + libc++ combination properly builds +static_assert(std::is_constructible<YAML::Node, const YAML::Node&>::value, "Node must be copy constructable"); + namespace YAML { namespace detail { struct iterator_value : public Node, std::pair<Node, Node> { diff --git a/Source/UnrealYAML/yaml-cpp/include/node/node.h b/Source/UnrealYAML/yaml-cpp/include/node/node.h index 673f753..22e7fb7 100644 --- a/Source/UnrealYAML/yaml-cpp/include/node/node.h +++ b/Source/UnrealYAML/yaml-cpp/include/node/node.h @@ -10,7 +10,7 @@ #include <stdexcept> #include <string> -#include "dll.h" + #include "emitterstyle.h" #include "mark.h" #include "node/detail/iterator_fwd.h" diff --git a/Source/UnrealYAML/yaml-cpp/include/node/parse.h b/Source/UnrealYAML/yaml-cpp/include/node/parse.h index b8c17fd..8877407 100644 --- a/Source/UnrealYAML/yaml-cpp/include/node/parse.h +++ b/Source/UnrealYAML/yaml-cpp/include/node/parse.h @@ -11,7 +11,7 @@ #include <string> #include <vector> -#include "dll.h" + namespace YAML { class Node; diff --git a/Source/UnrealYAML/yaml-cpp/include/node/ptr.h b/Source/UnrealYAML/yaml-cpp/include/node/ptr.h index d8b28e9..a426541 100644 --- a/Source/UnrealYAML/yaml-cpp/include/node/ptr.h +++ b/Source/UnrealYAML/yaml-cpp/include/node/ptr.h @@ -7,7 +7,7 @@ #pragma once #endif -#include "dll.h" + #include <memory> namespace YAML { diff --git a/Source/UnrealYAML/yaml-cpp/include/null.h b/Source/UnrealYAML/yaml-cpp/include/null.h index cd01112..4b624d6 100644 --- a/Source/UnrealYAML/yaml-cpp/include/null.h +++ b/Source/UnrealYAML/yaml-cpp/include/null.h @@ -7,7 +7,7 @@ #pragma once #endif -#include "dll.h" + #include <string> namespace YAML { diff --git a/Source/UnrealYAML/yaml-cpp/include/ostream_wrapper.h b/Source/UnrealYAML/yaml-cpp/include/ostream_wrapper.h index 4fd313b..5cd169a 100644 --- a/Source/UnrealYAML/yaml-cpp/include/ostream_wrapper.h +++ b/Source/UnrealYAML/yaml-cpp/include/ostream_wrapper.h @@ -10,7 +10,7 @@ #include <string> #include <vector> -#include "dll.h" + namespace YAML { class YAML_CPP_API ostream_wrapper { diff --git a/Source/UnrealYAML/yaml-cpp/include/parser.h b/Source/UnrealYAML/yaml-cpp/include/parser.h index 9b2b357..b8e56b5 100644 --- a/Source/UnrealYAML/yaml-cpp/include/parser.h +++ b/Source/UnrealYAML/yaml-cpp/include/parser.h @@ -10,8 +10,6 @@ #include <ios> #include <memory> -#include "dll.h" - namespace YAML { class EventHandler; class Node; diff --git a/Source/UnrealYAML/yaml-cpp/src/binary.cpp b/Source/UnrealYAML/yaml-cpp/src/binary.cpp index 743ca32..26e1973 100644 --- a/Source/UnrealYAML/yaml-cpp/src/binary.cpp +++ b/Source/UnrealYAML/yaml-cpp/src/binary.cpp @@ -79,7 +79,7 @@ std::vector<unsigned char> DecodeBase64(const std::string &input) { // skip newlines continue; } - unsigned char d = decoding[static_cast<unsigned>(input[i])]; + unsigned char d = decoding[static_cast<unsigned char>(input[i])]; if (d == 255) return ret_type(); diff --git a/Source/UnrealYAML/yaml-cpp/src/contrib/graphbuilder.cpp b/Source/UnrealYAML/yaml-cpp/src/contrib/graphbuilder.cpp index ee8cd5d..7251955 100644 --- a/Source/UnrealYAML/yaml-cpp/src/contrib/graphbuilder.cpp +++ b/Source/UnrealYAML/yaml-cpp/src/contrib/graphbuilder.cpp @@ -1,5 +1,6 @@ #include "contrib/graphbuilder.h" -#include "contrib/graphbuilderadapter.h" +#include "graphbuilderadapter.h" + #include "parser.h" namespace YAML { diff --git a/Source/UnrealYAML/yaml-cpp/src/node/depthguard.cpp b/Source/UnrealYAML/yaml-cpp/src/depthguard.cpp similarity index 100% rename from Source/UnrealYAML/yaml-cpp/src/node/depthguard.cpp rename to Source/UnrealYAML/yaml-cpp/src/depthguard.cpp diff --git a/Source/UnrealYAML/yaml-cpp/src/node/emit.cpp b/Source/UnrealYAML/yaml-cpp/src/emit.cpp similarity index 100% rename from Source/UnrealYAML/yaml-cpp/src/node/emit.cpp rename to Source/UnrealYAML/yaml-cpp/src/emit.cpp diff --git a/Source/UnrealYAML/yaml-cpp/src/emitterutils.cpp b/Source/UnrealYAML/yaml-cpp/src/emitterutils.cpp index c3eb997..47f438c 100644 --- a/Source/UnrealYAML/yaml-cpp/src/emitterutils.cpp +++ b/Source/UnrealYAML/yaml-cpp/src/emitterutils.cpp @@ -367,13 +367,13 @@ bool WriteDoubleQuotedString(ostream_wrapper& out, const std::string& str, bool WriteLiteralString(ostream_wrapper& out, const std::string& str, std::size_t indent) { out << "|\n"; - out << IndentTo(indent); int codePoint; for (std::string::const_iterator i = str.begin(); GetNextCodePointAndAdvance(codePoint, i, str.end());) { if (codePoint == '\n') { - out << "\n" << IndentTo(indent); + out << "\n"; } else { + out<< IndentTo(indent); WriteCodePoint(out, codePoint); } } diff --git a/Source/UnrealYAML/yaml-cpp/src/node/detail/memory.cpp b/Source/UnrealYAML/yaml-cpp/src/memory.cpp similarity index 100% rename from Source/UnrealYAML/yaml-cpp/src/node/detail/memory.cpp rename to Source/UnrealYAML/yaml-cpp/src/memory.cpp diff --git a/Source/UnrealYAML/yaml-cpp/src/node/node.cpp b/Source/UnrealYAML/yaml-cpp/src/node.cpp similarity index 100% rename from Source/UnrealYAML/yaml-cpp/src/node/node.cpp rename to Source/UnrealYAML/yaml-cpp/src/node.cpp diff --git a/Source/UnrealYAML/yaml-cpp/src/node/detail/node_data.cpp b/Source/UnrealYAML/yaml-cpp/src/node_data.cpp similarity index 99% rename from Source/UnrealYAML/yaml-cpp/src/node/detail/node_data.cpp rename to Source/UnrealYAML/yaml-cpp/src/node_data.cpp index c1c7221..79b64f4 100644 --- a/Source/UnrealYAML/yaml-cpp/src/node/detail/node_data.cpp +++ b/Source/UnrealYAML/yaml-cpp/src/node_data.cpp @@ -14,6 +14,8 @@ namespace YAML { namespace detail { +YAML_CPP_API std::atomic<size_t> node::m_amount{0}; + const std::string& node_data::empty_scalar() { static const std::string svalue; return svalue; diff --git a/Source/UnrealYAML/yaml-cpp/src/node/parse.cpp b/Source/UnrealYAML/yaml-cpp/src/parse.cpp similarity index 100% rename from Source/UnrealYAML/yaml-cpp/src/node/parse.cpp rename to Source/UnrealYAML/yaml-cpp/src/parse.cpp diff --git a/Source/UnrealYAML/yaml-cpp/src/regex_yaml.h b/Source/UnrealYAML/yaml-cpp/src/regex_yaml.h index 750a353..ce3bf1e 100644 --- a/Source/UnrealYAML/yaml-cpp/src/regex_yaml.h +++ b/Source/UnrealYAML/yaml-cpp/src/regex_yaml.h @@ -10,7 +10,7 @@ #include <string> #include <vector> -#include "dll.h" + namespace YAML { class Stream; diff --git a/Source/UnrealYAML/yaml-cpp/src/scantoken.cpp b/Source/UnrealYAML/yaml-cpp/src/scantoken.cpp index 8682b5a..fda41a5 100644 --- a/Source/UnrealYAML/yaml-cpp/src/scantoken.cpp +++ b/Source/UnrealYAML/yaml-cpp/src/scantoken.cpp @@ -5,10 +5,10 @@ #include "regeximpl.h" #include "scanner.h" #include "scanscalar.h" -#include "scantag.h" -#include "tag.h" +#include "scantag.h" // IWYU pragma: keep +#include "tag.h" // IWYU pragma: keep #include "token.h" -#include "exceptions.h" +#include "exceptions.h" // IWYU pragma: keep #include "mark.h" namespace YAML { diff --git a/Source/UnrealYAML/yaml-cpp/src/singledocparser.cpp b/Source/UnrealYAML/yaml-cpp/src/singledocparser.cpp index 5fa8810..50e476e 100644 --- a/Source/UnrealYAML/yaml-cpp/src/singledocparser.cpp +++ b/Source/UnrealYAML/yaml-cpp/src/singledocparser.cpp @@ -425,8 +425,11 @@ anchor_t SingleDocParser::RegisterAnchor(const std::string& name) { anchor_t SingleDocParser::LookupAnchor(const Mark& mark, const std::string& name) const { auto it = m_anchors.find(name); - if (it == m_anchors.end()) - throw ParserException(mark, ErrorMsg::UNKNOWN_ANCHOR); + if (it == m_anchors.end()) { + std::stringstream ss; + ss << ErrorMsg::UNKNOWN_ANCHOR << name; + throw ParserException(mark, ss.str()); + } return it->second; } -- GitLab