ifcparse: fix missing include and const

This commit is contained in:
Dirk Olbrich
2024-02-22 20:51:02 +01:00
committed by Thomas Krijnen
parent 47a2971c65
commit eb50be5c52
3 changed files with 7 additions and 6 deletions
+3 -2
View File
@@ -20,6 +20,7 @@
#include "IfcGlobalId.h" #include "IfcGlobalId.h"
#include "IfcException.h" #include "IfcException.h"
#include "IfcLogger.h"
#include <algorithm> #include <algorithm>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
@@ -102,10 +103,10 @@ IfcParse::IfcGlobalId::IfcGlobalId() {
#ifndef NDEBUG #ifndef NDEBUG
std::vector<unsigned char> test_vector; std::vector<unsigned char> test_vector;
expand(string_data, test_vector); expand(string_data_, test_vector);
boost::uuids::uuid test_uuid; boost::uuids::uuid test_uuid;
std::copy(test_vector.begin(), test_vector.end(), test_uuid.begin()); 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"); Logger::Message(Logger::LOG_ERROR, "Internal error generating GlobalId");
} }
#endif #endif
+3 -3
View File
@@ -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"}; 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> 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 << "[" << severity_strings<typename T::char_type>::value[type] << "] ";
out << "[" << get_time(type <= Logger::LOG_PERF).c_str() << "] "; out << "[" << get_time(type <= Logger::LOG_PERF).c_str() << "] ";
if (current_product) { if (current_product) {
@@ -86,7 +86,7 @@ std::basic_string<T> string_as(const std::string& string) {
} }
template <typename T> 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; 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 // @todo this is crazy
@@ -245,7 +245,7 @@ std::stringstream Logger::log_stream_;
Logger::Severity Logger::verbosity_ = Logger::LOG_NOTICE; Logger::Severity Logger::verbosity_ = Logger::LOG_NOTICE;
Logger::Severity Logger::max_severity_ = Logger::LOG_NOTICE; Logger::Severity Logger::max_severity_ = Logger::LOG_NOTICE;
Logger::Format Logger::format_ = Logger::FMT_PLAIN; 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_; boost::optional<long long> Logger::first_timepoint_;
std::map<std::string, double> Logger::performance_statistics_; std::map<std::string, double> Logger::performance_statistics_;
std::map<std::string, double> Logger::performance_signal_start_; std::map<std::string, double> Logger::performance_signal_start_;
+1 -1
View File
@@ -57,7 +57,7 @@ class IFC_PARSE_API Logger {
static Severity verbosity_; static Severity verbosity_;
static Format format_; static Format format_;
static boost::optional<IfcUtil::IfcBaseClass*> current_product_; static boost::optional<const IfcUtil::IfcBaseClass*> current_product_;
static Severity max_severity_; static Severity max_severity_;
static boost::optional<long long> first_timepoint_; static boost::optional<long long> first_timepoint_;