Remove -Wno-extra-semi, add workaround for mjSORT confusing some IDEs
PiperOrigin-RevId: 808689636 Change-Id: Ia091fb597c171a33842e62690d06f32614fbe4eb
This commit is contained in:
committed by
Copybara-Service
parent
60cb976e82
commit
681f5767b2
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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_
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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<Sortable> GenerateData(int n, double unsorted_fraction) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user