Skip to content

Commit

Permalink
cpp17 and ifopsh fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aothms committed Nov 28, 2024
1 parent ee21867 commit 2244469
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ endforeach()
endif()

add_executable(voxec_exe voxec_main.cpp progress.h)
target_link_options(voxec_exe PRIVATE "/NOIMPLIB")
target_link_libraries(voxec_exe libvoxec)
set_property(TARGET voxec_exe PROPERTY OUTPUT_NAME voxec)

Expand Down
7 changes: 5 additions & 2 deletions voxec.h
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,10 @@ class op_create_geometry : public voxel_operation {
abort();
}

std::random_shuffle(geometries->begin(), geometries->end());
std::random_device rd;
std::mt19937 g(rd());

std::shuffle(geometries->begin(), geometries->end(), g);

return geometries;
}
Expand Down Expand Up @@ -2103,7 +2106,7 @@ namespace {
if (attr.type() == IfcUtil::Argument_DOUBLE) {
auto op = p.second.at(0);
auto v = p.second.substr(1);
auto attr_type = inst->declaration().attribute_by_index(idx);
auto attr_type = inst->declaration().as_entity()->attribute_by_index(idx);
#ifdef IFCOPENSHELL_08
double d0 = attr;
#else
Expand Down

0 comments on commit 2244469

Please sign in to comment.