Skip to content

Commit 94bd5ed

Browse files
SarahWeiiiclaude
andcommitted
Fix small issues flagged during #96 review
- CMakeLists.txt: drop /D_USE_MATH_DEFINES from MSVC branch for consistency with the non-MSVC drop; codebase uses its own Pi constant and never references M_PI. - btAlignedAllocator.cpp: fix the second (debug-only) unsigned long → uintptr_t pointer-arithmetic site; same Windows LLP64 truncation bug as the one fixed in the preceding commit. - run_example.sh: replace the non-existent -np flag with -pm off on SnowFlake and Octocat. -np was silently ignored by main's arg parser, so preprocess_mode was defaulting to auto instead of off. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 796b906 commit 94bd5ed

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ option(WITH_3RD_PARTY_LIBS "Include 3rd party libraries" ON)
1818
if(MSVC)
1919
# For Microsoft Visual Studio (Windows)
2020
add_compile_options("/bigobj")
21-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0 /D_USE_MATH_DEFINES")
21+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0")
2222
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
2323
else()
2424
# For non-MSVC (Linux, macOS, etc.)

run_example.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mkdir outputs
2-
./build/main -i examples/SnowFlake.obj -o outputs/SnowFlake_cvx.wrl -np -t 0.02
3-
./build/main -i examples/Octocat-v2.obj -o outputs/Octocat-v2_cvx.wrl -np -t 0.05
2+
./build/main -i examples/SnowFlake.obj -o outputs/SnowFlake_cvx.wrl -pm off -t 0.02
3+
./build/main -i examples/Octocat-v2.obj -o outputs/Octocat-v2_cvx.wrl -pm off -t 0.05
44
./build/main -i examples/KitchenPot.obj -o outputs/KitchenPot_cvx.wrl -t 0.05
55
./build/main -i examples/Kettle.obj -o outputs/Kettle_cvx.wrl -t 0.05
66
./build/main -i examples/Bottle.obj -o outputs/Bottle_cvx.wrl -t 0.05

src/btConvexHull/btAlignedAllocator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ void* btAlignedAllocInternal(size_t size, int32_t alignment, int32_t line, char*
112112
{
113113
void* ret;
114114
char* real;
115-
unsigned long offset;
115+
uintptr_t offset;
116116

117117
gTotalBytesAlignedAllocs += size;
118118
gNumAlignedAllocs++;
119119

120120
real = (char*)sAllocFunc(size + 2 * sizeof(void*) + (alignment - 1));
121121
if (real) {
122-
offset = (alignment - (unsigned long)(real + 2 * sizeof(void*))) & (alignment - 1);
122+
offset = (alignment - (uintptr_t)(real + 2 * sizeof(void*))) & (alignment - 1);
123123
ret = (void*)((real + 2 * sizeof(void*)) + offset);
124124
*((void**)(ret)-1) = (void*)(real);
125125
*((int32_t*)(ret)-2) = size;

0 commit comments

Comments
 (0)