Added integer support to KRNodeProperty

This commit is contained in:
2025-11-24 18:17:56 -08:00
parent 34e5b529bc
commit 14ee6f0419

View File

@@ -111,7 +111,11 @@ public:
void load(tinyxml2::XMLElement* element) void load(tinyxml2::XMLElement* element)
{ {
if constexpr (std::is_same<T, float>::value) { if constexpr (std::is_same<T, int>::value) {
if (element->QueryIntAttribute(config::name, &val) != tinyxml2::XML_SUCCESS) {
val = config::defaultVal;
}
} else if constexpr (std::is_same<T, float>::value) {
if (element->QueryFloatAttribute(config::name, &val) != tinyxml2::XML_SUCCESS) { if (element->QueryFloatAttribute(config::name, &val) != tinyxml2::XML_SUCCESS) {
val = config::defaultVal; val = config::defaultVal;
} }