Skip to content

Commit

Permalink
remove constructor init-order warnings; include<string>
Browse files Browse the repository at this point in the history
  • Loading branch information
chitalu committed Oct 6, 2023
1 parent 6dd6c36 commit e6f7464
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/mcut/internal/frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,8 @@ struct context_t {
, m_max_num_perturbation_attempts(1 << 2), // 4
// default winding order (as determing from the normals of the input mesh faces)
m_connected_component_winding_order(McConnectedComponentFaceWindingOrder::MC_CONNECTED_COMPONENT_FACE_WINDING_ORDER_AS_GIVEN)
, m_user_handle(handle) // i.e. the McContext handle that the client application uses to reference an instance of the context
,m_most_recent_dispatch_intersection_type(McDispatchIntersectionType::MC_DISPATCH_INTERSECTION_TYPE_MAX_ENUM),
, m_most_recent_dispatch_intersection_type(McDispatchIntersectionType::MC_DISPATCH_INTERSECTION_TYPE_MAX_ENUM)
, m_user_handle(handle), // i.e. the McContext handle that the client application uses to reference an instance of the context
// debug callback flags (all zero/unset by default). User must specify what they want via debug control function.
dbgCallbackBitfieldSource(0)
, dbgCallbackBitfieldType(0)
Expand Down
2 changes: 1 addition & 1 deletion include/mcut/internal/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,6 @@ pair<T> make_pair(const T a, const T b)
#endif

// used to marked/label unused function parameters to prevent warnings
#define UNUSED(x) [&x] {}()
#define UNUSED(x) [&x] {x;}()

#endif // MCUT_UTILS_H_
3 changes: 2 additions & 1 deletion source/kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9475,7 +9475,8 @@ void dispatch(output_t& output, const input_t& input)
m1_polygons_colored.reserve(m1_polygons_colored.size() + cs_face_count);

// reference to the list connected components (see declaration for details)
std::map<std::size_t, std::vector<std::pair<std::shared_ptr<hmesh_t>, connected_component_info_t>>>& separated_stitching_CCs = color_to_separated_connected_ccsponents[color_id]; // insert
//std::map<std::size_t, std::vector<std::pair<std::shared_ptr<hmesh_t>, connected_component_info_t>>>& separated_stitching_CCs = color_to_separated_connected_ccsponents[color_id]; // insert
color_to_separated_connected_ccsponents.insert(std::make_pair(color_id, std::map<std::size_t, std::vector<std::pair<std::shared_ptr<hmesh_t>, connected_component_info_t>>>())); // insert (used below when extractring connected components)

std::unordered_map<int, int>& m0_to_m1_face_colored = SAFE_ACCESS(color_to_m0_to_m1_face, color_id); // note: containing mappings only for traced source mesh polygons initially!
m0_to_m1_face_colored.reserve(m0_polygons.size());
Expand Down
2 changes: 1 addition & 1 deletion source/preproc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@ double getWindingNumber(std::shared_ptr<context_t> context_ptr, const vec3& quer
1<<12 // min 4096 elements before bothering to run multiple threads
);

std::atomic_thread_fence(std::memory_order_acq_rel);
//std::atomic_thread_fence(std::memory_order_acq_rel); // only the API thread touch the mem of

windingNumber = gWindingNumber.load(std::memory_order_relaxed);
}
Expand Down
3 changes: 2 additions & 1 deletion tests/source/booleanOperation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <mcut/mcut.h>

#include <vector>
#include <string>

struct BooleanOperation {
McContext myContext = MC_NULL_HANDLE;
Expand Down Expand Up @@ -115,7 +116,7 @@ UTEST_F_SETUP(BooleanOperation)

if (contextFlags & MC_DEBUG) {
EXPECT_EQ(mcDebugMessageCallback(utest_fixture->myContext, mcDebugOutput_, nullptr), MC_NO_ERROR);
EXPECT_EQ(mcDebugMessageControl(utest_fixture->myContext, McDebugSource::MC_DEBUG_SOURCE_ALL, McDebugType::MC_DEBUG_TYPE_ALL, McDebugSeverity::MC_DEBUG_SEVERITY_ALL, true), MC_NO_ERROR);
EXPECT_EQ(mcDebugMessageControl(utest_fixture->myContext, McDebugSource::MC_DEBUG_SOURCE_ALL, McDebugType::MC_DEBUG_TYPE_ALL, McDebugSeverity::MC_DEBUG_SEVERITY_ALL, MC_FALSE), MC_NO_ERROR);
}

utest_fixture->srcMeshVertices = {
Expand Down

0 comments on commit e6f7464

Please sign in to comment.