Files
BloomPatched/src/Helpers/YamlUtilities.hpp

19 lines
309 B
C++
Raw Normal View History

2022-07-23 15:36:05 +01:00
#pragma once
#include <yaml-cpp/yaml.h>
class YamlUtilities
2022-07-23 15:36:05 +01:00
{
public:
template <typename Type>
static bool isCastable(const YAML::Node& node) {
try {
node.as<Type>();
return true;
2022-07-23 15:36:05 +01:00
} catch (YAML::BadConversion&) {
return false;
2022-07-23 15:36:05 +01:00
}
}
};