Fix errors on clang

This commit is contained in:
aothms
2023-03-31 15:19:39 -04:00
parent a3e3a6bd0c
commit 99abc6e0e2
4 changed files with 25 additions and 32 deletions
+21 -11
View File
@@ -129,19 +129,10 @@ namespace IfcUtil {
Argument* get(const std::string& name) const;
template <typename T>
T get_value(const std::string& name) const {
auto attr = get(name);
return (T)*attr;
}
T get_value(const std::string& name) const;
template <typename T>
T get_value(const std::string& name, const T& default_value) const {
auto attr = get(name);
if (attr->isNull()) {
return default_value;
}
return (T)*attr;
}
T get_value(const std::string& name, const T& default_value) const;
boost::shared_ptr<aggregate_of_instance> get_inverse(const std::string& a) const;
};
@@ -157,4 +148,23 @@ namespace IfcUtil {
}
#include "../ifcparse/Argument.h"
namespace IfcUtil {
template <typename T>
T IfcBaseEntity::get_value(const std::string& name) const {
auto attr = get(name);
return (T)*attr;
}
template <typename T>
T IfcBaseEntity::get_value(const std::string& name, const T& default_value) const {
auto attr = get(name);
if (attr->isNull()) {
return default_value;
}
return (T)*attr;
}
}
#endif