mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-06 07:51:47 +00:00
ifcparse: fix missing include and const
This commit is contained in:
committed by
Thomas Krijnen
parent
47a2971c65
commit
eb50be5c52
@@ -20,6 +20,7 @@
|
||||
#include "IfcGlobalId.h"
|
||||
|
||||
#include "IfcException.h"
|
||||
#include "IfcLogger.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
@@ -102,10 +103,10 @@ IfcParse::IfcGlobalId::IfcGlobalId() {
|
||||
|
||||
#ifndef NDEBUG
|
||||
std::vector<unsigned char> test_vector;
|
||||
expand(string_data, test_vector);
|
||||
expand(string_data_, test_vector);
|
||||
boost::uuids::uuid test_uuid;
|
||||
std::copy(test_vector.begin(), test_vector.end(), test_uuid.begin());
|
||||
if (uuid_data != test_uuid) {
|
||||
if (uuid_data_ != test_uuid) {
|
||||
Logger::Message(Logger::LOG_ERROR, "Internal error generating GlobalId");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -61,7 +61,7 @@ template <>
|
||||
const std::array<std::basic_string<wchar_t>, 5> severity_strings<wchar_t>::value = {L"Performance", L"Debug", L"Notice", L"Warning", L"Error"};
|
||||
|
||||
template <typename T>
|
||||
void plain_text_message(T& out, const boost::optional<IfcUtil::IfcBaseClass*>& current_product, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseInterface* instance) {
|
||||
void plain_text_message(T& out, const boost::optional<const IfcUtil::IfcBaseClass*>& current_product, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseInterface* instance) {
|
||||
out << "[" << severity_strings<typename T::char_type>::value[type] << "] ";
|
||||
out << "[" << get_time(type <= Logger::LOG_PERF).c_str() << "] ";
|
||||
if (current_product) {
|
||||
@@ -86,7 +86,7 @@ std::basic_string<T> string_as(const std::string& string) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void json_message(T& out, const boost::optional<IfcUtil::IfcBaseClass*>& current_product, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseInterface* instance) {
|
||||
void json_message(T& out, const boost::optional<const IfcUtil::IfcBaseClass*>& current_product, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseInterface* instance) {
|
||||
boost::property_tree::basic_ptree<std::basic_string<typename T::char_type>, std::basic_string<typename T::char_type>> property_tree;
|
||||
|
||||
// @todo this is crazy
|
||||
@@ -245,7 +245,7 @@ std::stringstream Logger::log_stream_;
|
||||
Logger::Severity Logger::verbosity_ = Logger::LOG_NOTICE;
|
||||
Logger::Severity Logger::max_severity_ = Logger::LOG_NOTICE;
|
||||
Logger::Format Logger::format_ = Logger::FMT_PLAIN;
|
||||
boost::optional<IfcUtil::IfcBaseClass*> Logger::current_product_;
|
||||
boost::optional<const IfcUtil::IfcBaseClass*> Logger::current_product_;
|
||||
boost::optional<long long> Logger::first_timepoint_;
|
||||
std::map<std::string, double> Logger::performance_statistics_;
|
||||
std::map<std::string, double> Logger::performance_signal_start_;
|
||||
|
||||
@@ -57,7 +57,7 @@ class IFC_PARSE_API Logger {
|
||||
|
||||
static Severity verbosity_;
|
||||
static Format format_;
|
||||
static boost::optional<IfcUtil::IfcBaseClass*> current_product_;
|
||||
static boost::optional<const IfcUtil::IfcBaseClass*> current_product_;
|
||||
static Severity max_severity_;
|
||||
|
||||
static boost::optional<long long> first_timepoint_;
|
||||
|
||||
Reference in New Issue
Block a user