diff --git a/src/ifcconvert/IfcConvert.cpp b/src/ifcconvert/IfcConvert.cpp
index c2b73f5ddf..07f8d343ca 100644
--- a/src/ifcconvert/IfcConvert.cpp
+++ b/src/ifcconvert/IfcConvert.cpp
@@ -99,7 +99,7 @@ void print_usage(bool suggest_help = true)
<< " .svg SVG Scalable Vector Graphics (2D floor plan)\n"
<< " .ifc IFC-SPF Industry Foundation Classes\n"
<< "\n"
- << "If no output filename given, ." + IfcUtil::path::from_utf8(DEFAULT_EXTENSION) + " will be used as the output file.\n";
+ << "If no output filename given, ." << IfcUtil::path::from_utf8(DEFAULT_EXTENSION) << " will be used as the output file.\n";
if (suggest_help) {
cout_ << "\nRun 'IfcConvert --help' for more information.";
}
@@ -209,15 +209,6 @@ int main(int argc, char** argv) {
#endif
("input-file", new po::typed_value(0), "input IFC file")
("output-file", new po::typed_value(0), "output geometry file");
-
-
- double deflection_tolerance;
- inclusion_filter include_filter;
- inclusion_traverse_filter include_traverse_filter;
- exclusion_filter exclude_filter;
- exclusion_traverse_filter exclude_traverse_filter;
- std::string filter_filename;
- std::string default_material_filename;
po::options_description ifc_options("IFC options");
ifc_options.add_options()
@@ -531,7 +522,7 @@ int main(int argc, char** argv) {
STP = IfcUtil::path::from_utf8(".stp"),
IGS = IfcUtil::path::from_utf8(".igs"),
SVG = IfcUtil::path::from_utf8(".svg"),
- XML = IfcUtil::path::from_utf8(".xml");
+ XML = IfcUtil::path::from_utf8(".xml"),
IFC = IfcUtil::path::from_utf8(".ifc");
// @todo clean up serializer selection
@@ -559,7 +550,7 @@ int main(int argc, char** argv) {
} else if (output_extension == IFC) {
int exit_code = EXIT_FAILURE;
try {
- if (init_input_file(input_filename, ifc_file, no_progress || quiet, mmap)) {
+ if (init_input_file(IfcUtil::path::to_utf8(input_filename), ifc_file, no_progress || quiet, mmap)) {
time_t start, end;
time(&start);
std::ofstream fs(output_filename.c_str());
diff --git a/src/ifcparse/IfcLogger.cpp b/src/ifcparse/IfcLogger.cpp
index 55eb7faffb..c841352d5e 100644
--- a/src/ifcparse/IfcLogger.cpp
+++ b/src/ifcparse/IfcLogger.cpp
@@ -49,12 +49,12 @@ namespace {
void plain_text_message(T& os, const boost::optional& current_product, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
os << "[" << severity_strings::value[type] << "] ";
if (current_product) {
- std::string global_id = *(**current_product).get("GlobalId"));
+ std::string global_id = *((IfcUtil::IfcBaseEntity*)*current_product)->get("GlobalId");
os << "{" << global_id.c_str() << "} ";
}
os << message.c_str() << std::endl;
if (instance) {
- std::string instance_string = entity->data().toString();
+ std::string instance_string = instance->data().toString();
if (instance_string.size() > 259) {
instance_string = instance_string.substr(0, 256) + "...";
}
@@ -113,18 +113,6 @@ void Logger::SetOutput(std::wostream* l1, std::wostream* l2) {
}
}
-template
-void Logger::log(T& log2, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
- log2 << "[" << severity_strings::value[type] << "] ";
- if (current_product) {
- log2 << "{" << (*current_product)->GlobalId().c_str() << "} ";
- }
- log2 << message.c_str() << std::endl;
- if (instance) {
- log2 << instance->data().toString().c_str() << std::endl;
- }
-}
-
void Logger::Message(Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
if ((log2 || wlog2) && type >= verbosity) {
if (format == FMT_PLAIN) {
diff --git a/src/ifcparse/IfcLogger.h b/src/ifcparse/IfcLogger.h
index 4f5b0a4d4c..9ae7f49e39 100644
--- a/src/ifcparse/IfcLogger.h
+++ b/src/ifcparse/IfcLogger.h
@@ -53,10 +53,6 @@ private:
static Format format;
static boost::optional current_product;
static Severity max_severity;
- static boost::optional current_product;
-
- template
- static void log(T& log2, Logger::Severity type, const std::string& message, IfcUtil::IfcBaseClass* instance);
public:
static void SetProduct(boost::optional product);