From b27482db4628b3325710c2a5dd75b72fa18a9edb Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Tue, 28 May 2019 12:48:40 +0200 Subject: [PATCH] Correct change_extension after unicode changes --- src/ifcconvert/IfcConvert.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ifcconvert/IfcConvert.cpp b/src/ifcconvert/IfcConvert.cpp index 5c8c65f8f0..144a8826f6 100644 --- a/src/ifcconvert/IfcConvert.cpp +++ b/src/ifcconvert/IfcConvert.cpp @@ -70,7 +70,7 @@ static std::ostream& cout_ = std::cout; static std::ostream& cerr_ = std::cerr; #endif -const std::string DEFAULT_EXTENSION = "obj"; +const std::string DEFAULT_EXTENSION = ".obj"; const std::string TEMP_FILE_EXTENSION = ".tmp"; namespace po = boost::program_options; @@ -94,7 +94,7 @@ void print_usage(bool suggest_help = true) << " .xml XML Property definitions and decomposition tree\n" << " .svg SVG Scalable Vector Graphics (2D floor plan)\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."; } @@ -119,7 +119,7 @@ template T change_extension(const T& fn, const T& ext) { typename T::size_type dot = fn.find_last_of('.'); if (dot != T::npos) { - return fn.substr(0, dot + 1) + ext; + return fn.substr(0, dot) + ext; } else { return fn + ext; }