mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
Correct change_extension after unicode changes
This commit is contained in:
@@ -70,7 +70,7 @@ static std::ostream& cout_ = std::cout;
|
|||||||
static std::ostream& cerr_ = std::cerr;
|
static std::ostream& cerr_ = std::cerr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const std::string DEFAULT_EXTENSION = "obj";
|
const std::string DEFAULT_EXTENSION = ".obj";
|
||||||
const std::string TEMP_FILE_EXTENSION = ".tmp";
|
const std::string TEMP_FILE_EXTENSION = ".tmp";
|
||||||
|
|
||||||
namespace po = boost::program_options;
|
namespace po = boost::program_options;
|
||||||
@@ -94,7 +94,7 @@ void print_usage(bool suggest_help = true)
|
|||||||
<< " .xml XML Property definitions and decomposition tree\n"
|
<< " .xml XML Property definitions and decomposition tree\n"
|
||||||
<< " .svg SVG Scalable Vector Graphics (2D floor plan)\n"
|
<< " .svg SVG Scalable Vector Graphics (2D floor plan)\n"
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< "If no output filename given, <input>." << IfcUtil::path::from_utf8(DEFAULT_EXTENSION) << " will be used as the output file.\n";
|
<< "If no output filename given, <input>" << IfcUtil::path::from_utf8(DEFAULT_EXTENSION) << " will be used as the output file.\n";
|
||||||
if (suggest_help) {
|
if (suggest_help) {
|
||||||
cout_ << "\nRun 'IfcConvert --help' for more information.";
|
cout_ << "\nRun 'IfcConvert --help' for more information.";
|
||||||
}
|
}
|
||||||
@@ -119,7 +119,7 @@ template <typename T>
|
|||||||
T change_extension(const T& fn, const T& ext) {
|
T change_extension(const T& fn, const T& ext) {
|
||||||
typename T::size_type dot = fn.find_last_of('.');
|
typename T::size_type dot = fn.find_last_of('.');
|
||||||
if (dot != T::npos) {
|
if (dot != T::npos) {
|
||||||
return fn.substr(0, dot + 1) + ext;
|
return fn.substr(0, dot) + ext;
|
||||||
} else {
|
} else {
|
||||||
return fn + ext;
|
return fn + ext;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user