diff --git a/cmake/MujocoOptions.cmake b/cmake/MujocoOptions.cmake index 05658b74..de146d89 100644 --- a/cmake/MujocoOptions.cmake +++ b/cmake/MujocoOptions.cmake @@ -92,7 +92,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang -Wimplicit-fallthrough -Wunused -Wvla - -Wno-extra-semi -Wno-int-in-bool-context -Wno-sign-compare -Wno-unknown-pragmas diff --git a/sample/cmake/SampleOptions.cmake b/sample/cmake/SampleOptions.cmake index 05658b74..de146d89 100644 --- a/sample/cmake/SampleOptions.cmake +++ b/sample/cmake/SampleOptions.cmake @@ -92,7 +92,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang -Wimplicit-fallthrough -Wunused -Wvla - -Wno-extra-semi -Wno-int-in-bool-context -Wno-sign-compare -Wno-unknown-pragmas diff --git a/simulate/cmake/SimulateOptions.cmake b/simulate/cmake/SimulateOptions.cmake index 05658b74..de146d89 100644 --- a/simulate/cmake/SimulateOptions.cmake +++ b/simulate/cmake/SimulateOptions.cmake @@ -92,7 +92,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang -Wimplicit-fallthrough -Wunused -Wvla - -Wno-extra-semi -Wno-int-in-bool-context -Wno-sign-compare -Wno-unknown-pragmas diff --git a/src/engine/engine_collision_driver.c b/src/engine/engine_collision_driver.c index ab324e6e..c6f202ea 100644 --- a/src/engine/engine_collision_driver.c +++ b/src/engine/engine_collision_driver.c @@ -1012,7 +1012,7 @@ static inline int SAPcmp(mjtSAP* obj1, mjtSAP* obj2, void* context) { } // define SAPsort function for sorting SAP sorting -mjSORT(SAPsort, mjtSAP, SAPcmp) +mjSORT(SAPsort, mjtSAP, SAPcmp); // given list of axis-aligned bounding boxes in AAMM (xmin[3], xmax[3]) format, diff --git a/src/engine/engine_sensor.c b/src/engine/engine_sensor.c index f8fba7ea..8c78a525 100644 --- a/src/engine/engine_sensor.c +++ b/src/engine/engine_sensor.c @@ -56,7 +56,7 @@ static int ContactInfoCompare(const ContactInfo* a, const ContactInfo* b, void* return 0; } -mjPARTIAL_SORT(ContactSelect, ContactInfo, ContactInfoCompare) +mjPARTIAL_SORT(ContactSelect, ContactInfo, ContactInfoCompare); // apply cutoff after each stage diff --git a/src/engine/engine_sort.h b/src/engine/engine_sort.h index a5ac28f3..7ede45ee 100644 --- a/src/engine/engine_sort.h +++ b/src/engine/engine_sort.h @@ -70,7 +70,7 @@ tmp = src; src = dest; dest = tmp; \ } \ if (src != arr) memcpy(arr, src, n * sizeof(type)); \ - } + } static inline void name(type* arr, type* buf, int n, void* context) // sub-macro that sifts down a node in a max heap to its correct position @@ -106,6 +106,6 @@ /* copy back and sort the result */ \ for (int j = 0; j < k; j++) arr[j] = buf[j]; \ _mjINSERTION_SORT(type, arr, 0, k, cmp, context); \ - } + } static inline void name(type* arr, type* buf, int n, int k, void* context) #endif // MUJOCO_SRC_ENGINE_ENGINE_SORT_H_ diff --git a/src/render/render_gl3.c b/src/render/render_gl3.c index 5b4be041..133e5d6a 100644 --- a/src/render/render_gl3.c +++ b/src/render/render_gl3.c @@ -789,7 +789,7 @@ static inline int geomcmp(int* i, int* j, void* context) { } // define geomSort function for sorting geoms -mjSORT(geomSort, int, geomcmp) +mjSORT(geomSort, int, geomcmp); diff --git a/test/benchmark/sort_benchmark_test.cc b/test/benchmark/sort_benchmark_test.cc index a1f65d7c..16bc836c 100644 --- a/test/benchmark/sort_benchmark_test.cc +++ b/test/benchmark/sort_benchmark_test.cc @@ -43,7 +43,7 @@ int CompareSortable(const Sortable* a, const Sortable* b, void* context) { } // Instantiate the sort function. -mjSORT(SortSortable, Sortable, CompareSortable) +mjSORT(SortSortable, Sortable, CompareSortable); // Generate data for sorting benchmarks. std::vector GenerateData(int n, double unsorted_fraction) { diff --git a/test/engine/engine_sort_test.cc b/test/engine/engine_sort_test.cc index 23410a21..3ed9c5fc 100644 --- a/test/engine/engine_sort_test.cc +++ b/test/engine/engine_sort_test.cc @@ -77,8 +77,8 @@ int IntCompare(int* i, int* j, void* context) { return 1; } } -mjSORT(IntSort, int, IntCompare) -mjPARTIAL_SORT(IntSelect, int, IntCompare) +mjSORT(IntSort, int, IntCompare); +mjPARTIAL_SORT(IntSelect, int, IntCompare); int IntStructCompare(const IntStruct* x, const IntStruct* y, void* context) { IntStruct* a = (IntStruct*)x; @@ -91,8 +91,8 @@ int IntStructCompare(const IntStruct* x, const IntStruct* y, void* context) { return 1; } } -mjSORT(IntStructSort, IntStruct, IntStructCompare) -mjPARTIAL_SORT(IntStructSelect, IntStruct, IntStructCompare) +mjSORT(IntStructSort, IntStruct, IntStructCompare); +mjPARTIAL_SORT(IntStructSelect, IntStruct, IntStructCompare); TEST_F(EngineSortTest, Sort) { int total = 0;