Skip to content

Commit

Permalink
Replace unpacking with boost::tie() for compatibility with msvc17 bui…
Browse files Browse the repository at this point in the history
…ld machine
  • Loading branch information
aothms committed Apr 14, 2024
1 parent 6a6aa77 commit 3230854
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/ifcgeom/mapping/IfcFixedReferenceSweptAreaSolid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,10 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcFixedReferenceSweptAreaSolid
for (size_t i = 0; i <= num_steps; ++i) {
auto m4 = pwf->evaluate(start + curve_length / num_steps * i);

/*
std::stringstream ss;
ss << m4;
auto s = ss.str();
std::wcout << s.c_str() << std::endl;
*/

Eigen::Matrix4d m4b = Eigen::Matrix4d::Identity();
bool is_directrix_derived = false;
Expand All @@ -85,8 +83,8 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcFixedReferenceSweptAreaSolid
auto pos = m4.col(3).head<3>();

if (is_directrix_derived) {
m4b.col(0).head<3>() = m4.col(2).head<3>().cross(m4.col(0).head<3>());
m4b.col(1).head<3>() = m4.col(2).head<3>();
m4b.col(0).head<3>() = m4.col(1).head<3>();
m4b.col(1).head<3>() = m4.col(0).head<3>().cross(m4.col(1).head<3>());
m4b.col(2).head<3>() = m4.col(0).head<3>();
m4b.col(3).head<3>() = pos;
} else {
Expand Down
12 changes: 8 additions & 4 deletions src/ifcparse/IfcAlignmentHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ std::tuple<typename aggregate_of<Ifc4x3_add2::IfcObjectDefinition>::ptr, typenam
typename aggregate_of<Ifc4x3_add2::IfcSegment>::ptr horizontal_curve_segments(include_geometry ? new aggregate_of<Ifc4x3_add2::IfcSegment>() : nullptr); // geometry

auto point_iter = points.begin();
auto [xBT, yBT] = *point_iter;
double xBT, yBT, xPI, yPI;

boost::tie(xBT, yBT) = *point_iter;

point_iter++;
auto [xPI, yPI] = *point_iter;
boost::tie(xPI, yPI) = *point_iter;

double xFT, yFT;
for (auto radius : radii) {
Expand Down Expand Up @@ -227,10 +229,12 @@ std::tuple<typename aggregate_of<Ifc4x3_add2::IfcObjectDefinition>::ptr, typenam
typename aggregate_of<Ifc4x3_add2::IfcSegment>::ptr vertical_curve_segments(new aggregate_of<Ifc4x3_add2::IfcSegment>()); // geometry

auto point_iter = vpoints.begin();
auto [xPBG, yPBG] = *point_iter;
double xPBG, yPBG, xPVI, yPVI;

boost::tie(xPBG, yPBG) = *point_iter;

point_iter++;
auto [xPVI, yPVI] = *point_iter;
boost::tie(xPVI, yPVI) = *point_iter;

double xPFG, yPFG;
for (auto length : vclengths) {
Expand Down

0 comments on commit 3230854

Please sign in to comment.