Fix previous commit on gcc

This commit is contained in:
Thomas Krijnen
2018-05-13 08:45:33 +02:00
parent 10c10363c2
commit 68eab4310c
5 changed files with 18 additions and 20 deletions
+9 -8
View File
@@ -25,6 +25,7 @@
#include "IfcGeom.h"
#include <boost/foreach.hpp>
#include <boost/function.hpp>
#include <boost/regex.hpp>
#include <boost/algorithm/string/replace.hpp>
@@ -87,7 +88,7 @@ namespace IfcGeom
void populate(const std::set<std::string>& patterns)
{
values.clear();
foreach(const std::string &pattern, patterns) {
BOOST_FOREACH(const std::string &pattern, patterns) {
values.insert(wildcard_string_to_regex(pattern));
}
}
@@ -96,7 +97,7 @@ namespace IfcGeom
static bool match_values(const std::set<boost::regex>& values, const std::string &str)
{
foreach(const boost::regex& r, values) {
BOOST_FOREACH(const boost::regex& r, values) {
if (boost::regex_match(str, r)) {
return true;
}
@@ -108,7 +109,7 @@ namespace IfcGeom
{
// Escape all non-"*?" regex special chars
static const std::string special_chars = "\\^.$|()[]+/";
foreach(char c, special_chars) {
BOOST_FOREACH(char c, special_chars) {
std::string char_str(1, c);
boost::replace_all(str, char_str, "\\" + char_str);
}
@@ -180,7 +181,7 @@ namespace IfcGeom
ss << (traverse ? "traverse " : "") << (include ? "include" : "exclude");
std::vector<std::string> patterns;
foreach(const boost::regex& r, values) {
BOOST_FOREACH(const boost::regex& r, values) {
patterns.push_back("\"" + r.str() + "\"");
}
@@ -237,7 +238,7 @@ namespace IfcGeom
std::stringstream ss;
ss << (traverse ? "traverse " : "") << (include ? "include" : "exclude") << " layers";
std::vector<std::string> str_values;
foreach(const boost::regex& r, values) {
BOOST_FOREACH(const boost::regex& r, values) {
str_values.push_back(" \"" + r.str() + "\"");
}
ss << boost::algorithm::join(str_values, " ");
@@ -259,7 +260,7 @@ namespace IfcGeom
void populate(const std::set<std::string>& types)
{
values.clear();
foreach(const std::string& type, types) {
BOOST_FOREACH(const std::string& type, types) {
IfcSchema::Type::Enum ty;
try {
ty = IfcSchema::Type::FromString(boost::to_upper_copy(type));
@@ -274,7 +275,7 @@ namespace IfcGeom
bool match(IfcSchema::IfcProduct* prod) const
{
// The set is iterated over to able to filter on subtypes.
foreach(IfcSchema::Type::Enum type, values) {
BOOST_FOREACH(IfcSchema::Type::Enum type, values) {
if (prod->is(type)) {
return true;
}
@@ -291,7 +292,7 @@ namespace IfcGeom
{
std::stringstream ss;
ss << (traverse ? "traverse " : "") << (include ? "include" : "exclude") << " entities";
foreach(IfcSchema::Type::Enum type, values) {
BOOST_FOREACH(IfcSchema::Type::Enum type, values) {
ss << " " << IfcSchema::Type::ToString(type);
}
description = ss.str();