Replaced BOOST_FOREACH with c++11 ranged for loops
This commit is contained in:
@@ -239,7 +239,7 @@ public:
|
||||
, total()
|
||||
{
|
||||
curves.reserve(entity.Segments.size());
|
||||
BOOST_FOREACH(const IfcCompositeCurveSegment& curveSegment,entity.Segments) {
|
||||
for(const IfcCompositeCurveSegment& curveSegment :entity.Segments) {
|
||||
// according to the specification, this must be a bounded curve
|
||||
boost::shared_ptr< Curve > cv(Curve::Convert(curveSegment.ParentCurve,conv));
|
||||
boost::shared_ptr< BoundedCurve > bc = boost::dynamic_pointer_cast<BoundedCurve>(cv);
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
}
|
||||
|
||||
IfcFloat acc = 0;
|
||||
BOOST_FOREACH(const CurveEntry& entry, curves) {
|
||||
for(const CurveEntry& entry : curves) {
|
||||
const ParamRange& range = entry.first->GetParametricRange();
|
||||
const IfcFloat delta = std::abs(range.second-range.first);
|
||||
if (u < acc+delta) {
|
||||
@@ -290,7 +290,7 @@ public:
|
||||
size_t cnt = 0;
|
||||
|
||||
IfcFloat acc = 0;
|
||||
BOOST_FOREACH(const CurveEntry& entry, curves) {
|
||||
for(const CurveEntry& entry : curves) {
|
||||
const ParamRange& range = entry.first->GetParametricRange();
|
||||
const IfcFloat delta = std::abs(range.second-range.first);
|
||||
if (a <= acc+delta && b >= acc) {
|
||||
@@ -312,7 +312,7 @@ public:
|
||||
const size_t cnt = EstimateSampleCount(a,b);
|
||||
out.verts.reserve(out.verts.size() + cnt);
|
||||
|
||||
BOOST_FOREACH(const CurveEntry& entry, curves) {
|
||||
for(const CurveEntry& entry : curves) {
|
||||
const size_t cnt = out.verts.size();
|
||||
entry.first->SampleDiscrete(out);
|
||||
|
||||
@@ -357,7 +357,7 @@ public:
|
||||
// oh well.
|
||||
bool have_param = false, have_point = false;
|
||||
IfcVector3 point;
|
||||
BOOST_FOREACH(const Entry sel,entity.Trim1) {
|
||||
for(const Entry sel :entity.Trim1) {
|
||||
if (const EXPRESS::REAL* const r = sel->ToPtr<EXPRESS::REAL>()) {
|
||||
range.first = *r;
|
||||
have_param = true;
|
||||
@@ -374,7 +374,7 @@ public:
|
||||
}
|
||||
}
|
||||
have_param = false, have_point = false;
|
||||
BOOST_FOREACH(const Entry sel,entity.Trim2) {
|
||||
for(const Entry sel :entity.Trim2) {
|
||||
if (const EXPRESS::REAL* const r = sel->ToPtr<EXPRESS::REAL>()) {
|
||||
range.second = *r;
|
||||
have_param = true;
|
||||
@@ -465,7 +465,7 @@ public:
|
||||
points.reserve(entity.Points.size());
|
||||
|
||||
IfcVector3 t;
|
||||
BOOST_FOREACH(const IfcCartesianPoint& cp, entity.Points) {
|
||||
for(const IfcCartesianPoint& cp : entity.Points) {
|
||||
ConvertCartesianPoint(t,cp);
|
||||
points.push_back(t);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user