diff --git a/README.md b/README.md index 0326681b2168858e334ba1dbdeb57900d544e9b4..14ac232333f3293c915687d04ab7198f30332f3f 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 bd4dbd961c8e072cfc8e09baa2a47542760cca9d..b9df91785d00342b87f682cb8122fc93437a54a5 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 40216c7162a89a15067c562a3b96974b5dfb5c29..187248986bf0b74a1a9315803752515b74ebb702 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 e3306b3e9fb719132458e20fc83ad6ebb53e9cff..0000000000000000000000000000000000000000 --- 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 a393c04f5637c6fb782d1ece1d9d451d93320ff1..d7bcd1c1ce814064e3b268a40ddfb4bcae58adda 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 4e4aef80418781360a29e883cd1bae54630702dc..a3f9c6c28c794f6f1a6c2ab105835a138350a5b9 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 8ba7dfaa1d99b7844fef14fa4d9bf71ddeaab3b9..8a14269691ec0e245e2670de4298b75f7a8183d9 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 7b3ba27f8ba2151f8355ee53212b3e1261188722..c7b6f628ef204e53976125d23babe61d43f043ca 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 5ed58aff4646764a798485a4eb831ad50ac260ee..dad6caa712515540d0d9bcdcf985b36f7867a7c7 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 bb90adc070168b250434cb754e4a9361bf9ce4f2..002999f11ed52e4ace3de5b5a8ce837997547eaf 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 1e26090b1afff421e61cf51229e6b531330acaae..fb49e886c0418388ebdae91b6988a9a6dcc1f0ed 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 dd1fc4e236b7dadf9562005d7d54963a3237b353..056bcee7d9e4717e71772efd4aba29e1e3e6e5c5 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 6683d6db3b8c1d6c20fafce6fd0bd90973780bd2..9563aa802dd2b729d9e32a2cb5051f989602674e 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 dbaa040063967f544b92e8873d741658deae40f8..aa625f2b76ff0c549e579ddd34e5b808aabc1bff 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 e6eaaeaac5af7b32cd284f11058d3d990c506e25..3137a59ba8db283721c93b0ade711a08eccf74b3 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 a0280dba86c17f49dbf53f8d86d9f2b077471161..f15580e851baf87c5f21735dd7dd4c930fe9d950 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 ee0acadfded123fe3286aeed18f25d4015cb1a14..07f02b578d15297717261fbe3d2c7ee6e5bc88d8 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 607cc86c25559060180614fc68d3b1efeda53d29..3f73e1954c37a432cdbf51a09b1a5cdb9f2ff9d0 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 673f7532fde6e71872dad347026c43599ff23703..22e7fb7e9d6e8804182609e4ca912bdf753876a1 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 b8c17fdf6160c88f9b92166964be6b322b9b3bad..88774076f4a710c96db5f2ccd56ae15593d976f0 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 d8b28e9bf09b444ce3f30936bd73ff785d51ad93..a4265416af70a61b175b650d76f96b1ac9b0bc71 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 cd011124e51788d403ba9a4750a4dc2407ef37c8..4b624d6bad07623d3fa0e383ad4298625dec15d4 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 4fd313b80a82b02c3a94ca16d9f554753ec7966d..5cd169a6626ad10f0eefd6667bb84ae3ed49be0c 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 9b2b357ba73ff7f6aca432c17a68607bb392aa57..b8e56b5b470ce1dcf0821eb6016e06bfefe9086a 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 743ca321a32709ba0810a648d9a3a2583bd5c851..26e1973b947690723999ea768721365570baddd0 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 ee8cd5d8965ac432219d733aa670f375edb35fd0..72519559d7ac6515ef9ed8bcce279157c8632959 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 c3eb9974efcb2feca9a820a194e603e923f0e356..47f438ccd2dcce10ce011ca8fce5f57f4038234b 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 c1c7221d911b180be174ddf2a33b88eee312e6e4..79b64f46c9b3b3649bb97b77701e7956f019f293 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 750a35328ec07d05dc2e9cb1007d77f321b83858..ce3bf1e47a5f0ba864b9f198831b324e7edc8353 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 8682b5a749044514c2f053b88982dd48e914d7b2..fda41a59c6e5b056c746d0551c01085128ee7dd7 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 5fa8810ee31fd2c4ed42a61d968c7ef843f54e67..50e476e2664dd2e44474b8fc214c4a285fe346b7 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; }