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
-1
View File
@@ -11,7 +11,6 @@
#include <string>
#include <tuple>
#include <exception>
#include <cstdalign>
// @todo don't do std::less but use hashing and cache hash values.
+3 -20
View File
@@ -27,32 +27,15 @@
#include <algorithm>
#include "ifc_parse_api.h"
#include "../ifcparse/aggregate_of_instance.h"
#include "ArgumentType.h"
#include <boost/shared_ptr.hpp>
#include <boost/dynamic_bitset.hpp>
#include <boost/logic/tribool.hpp>
/*
namespace boost {
namespace logic {
class tribool {
};
}
}
*/
class Argument;
class aggregate_of_instance;
class aggregate_of_aggregate_of_instance;
class IfcEntityInstanceData;
namespace IfcParse {
class IfcFile;
}
namespace IfcUtil {
class IfcBaseClass;
@@ -76,11 +59,11 @@ public:
virtual operator std::vector<double>() const;
virtual operator std::vector<std::string>() const;
virtual operator std::vector<boost::dynamic_bitset<> >() const;
virtual operator aggregate_of_instance::ptr() const;
virtual operator boost::shared_ptr<aggregate_of_instance>() const;
virtual operator std::vector< std::vector<int> >() const;
virtual operator std::vector< std::vector<double> >() const;
virtual operator aggregate_of_aggregate_of_instance::ptr() const;
virtual operator boost::shared_ptr<aggregate_of_aggregate_of_instance>() const;
virtual bool isNull() const = 0;
virtual unsigned int size() const = 0;
+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
+1
View File
@@ -52,6 +52,7 @@
#include "../ifcparse/IfcBaseClass.h"
#include "../ifcparse/IfcLogger.h"
#include "../ifcparse/Argument.h"
#include "../ifcparse/aggregate_of_instance.h"
#include "../ifcparse/IfcSpfStream.h"