mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
Use boost::to_lower()
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include <boost/program_options.hpp>
|
#include <boost/program_options.hpp>
|
||||||
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
||||||
#include "../ifcgeom/IfcGeomIterator.h"
|
#include "../ifcgeom/IfcGeomIterator.h"
|
||||||
|
|
||||||
@@ -197,11 +198,8 @@ int main(int argc, char** argv) {
|
|||||||
// Gets the set ifc types to be ignored from the command line.
|
// Gets the set ifc types to be ignored from the command line.
|
||||||
std::set<std::string> entities;
|
std::set<std::string> entities;
|
||||||
for (std::vector<std::string>::const_iterator it = entity_vector.begin(); it != entity_vector.end(); ++it) {
|
for (std::vector<std::string>::const_iterator it = entity_vector.begin(); it != entity_vector.end(); ++it) {
|
||||||
std::string lowercase_type = *it;
|
const std::string& mixed_case_type = *it;
|
||||||
for (std::string::iterator c = lowercase_type.begin(); c != lowercase_type.end(); ++c) {
|
entities.insert(boost::to_lower_copy(mixed_case_type));
|
||||||
*c = tolower(*c);
|
|
||||||
}
|
|
||||||
entities.insert(lowercase_type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string input_filename = vmap["input-file"].as<std::string>();
|
const std::string input_filename = vmap["input-file"].as<std::string>();
|
||||||
@@ -217,9 +215,7 @@ int main(int argc, char** argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string output_extension = output_filename.substr(output_filename.size()-4);
|
std::string output_extension = output_filename.substr(output_filename.size()-4);
|
||||||
for (std::string::iterator c = output_extension.begin(); c != output_extension.end(); ++c) {
|
boost::to_lower(output_extension);
|
||||||
*c = tolower(*c);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If no entities are specified these are the defaults to skip from output
|
// If no entities are specified these are the defaults to skip from output
|
||||||
if (entity_vector.empty()) {
|
if (entity_vector.empty()) {
|
||||||
|
|||||||
@@ -181,11 +181,9 @@ namespace IfcGeom {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (context->hasContextType()) {
|
if (context->hasContextType()) {
|
||||||
std::string context_type_lc = context->ContextType();
|
std::string context_type = context->ContextType();
|
||||||
for (std::string::iterator c = context_type_lc.begin(); c != context_type_lc.end(); ++c) {
|
boost::to_lower(context_type);
|
||||||
*c = tolower(*c);
|
if (context_types.find(context_type) != context_types.end()) {
|
||||||
}
|
|
||||||
if (context_types.find(context_type_lc) != context_types.end()) {
|
|
||||||
filtered_contexts->push(context);
|
filtered_contexts->push(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user