src/pefile: stricter reloc checks; cleanups
This commit is contained in:
+3
-2
@@ -156,8 +156,9 @@ void upx_std_stable_sort(void *array, size_t n, upx_compare_func_t compare);
|
||||
|
||||
// #define UPX_CONFIG_USE_STABLE_SORT 1
|
||||
#if UPX_CONFIG_USE_STABLE_SORT
|
||||
// use std::stable_sort(); requires that "element_size" is constexpr!
|
||||
#define upx_qsort(a, n, element_size, compare) upx_std_stable_sort<(element_size)>(a, n, compare)
|
||||
// use std::stable_sort(); NOTE: requires that "element_size" is constexpr!
|
||||
#define upx_qsort(a, n, element_size, compare) \
|
||||
upx_std_stable_sort<(element_size)>((a), (n), (compare))
|
||||
#else
|
||||
// use libc qsort(); good enough for our use cases
|
||||
#define upx_qsort qsort
|
||||
|
||||
@@ -54,38 +54,6 @@ template <class T, class U>
|
||||
inline typename std::enable_if<std::is_integral<U>::value, void *>::type operator+(U, const C<T> &)
|
||||
XSPAN_DELETED_FUNCTION;
|
||||
|
||||
#if 0 // already handled by member functions
|
||||
XSPAN_FWD_TU_CONVERTIBLE(bool) operator==(const C<T> &a, const U *b) { return a.raw_bytes(0) == b; }
|
||||
XSPAN_FWD_TU_CONVERTIBLE(bool) operator==(const C<T> &a, const C<U> &b) {
|
||||
return a.raw_bytes(0) == b.raw_bytes(0);
|
||||
}
|
||||
#ifdef D
|
||||
XSPAN_FWD_TU_CONVERTIBLE(bool) operator==(const C<T> &a, const D<U> &b) {
|
||||
return a.raw_bytes(0) == b.raw_bytes(0);
|
||||
}
|
||||
#endif
|
||||
#ifdef E
|
||||
XSPAN_FWD_TU_CONVERTIBLE(bool) operator==(const C<T> &a, const E<U> &b) {
|
||||
return a.raw_bytes(0) == b.raw_bytes(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
XSPAN_FWD_TU_CONVERTIBLE(bool) operator!=(const C<T> &a, const U *b) { return a.raw_bytes(0) != b; }
|
||||
XSPAN_FWD_TU_CONVERTIBLE(bool) operator!=(const C<T> &a, const C<U> &b) {
|
||||
return a.raw_bytes(0) != b.raw_bytes(0);
|
||||
}
|
||||
#ifdef D
|
||||
XSPAN_FWD_TU_CONVERTIBLE(bool) operator!=(const C<T> &a, const D<U> &b) {
|
||||
return a.raw_bytes(0) != b.raw_bytes(0);
|
||||
}
|
||||
#endif
|
||||
#ifdef E
|
||||
XSPAN_FWD_TU_CONVERTIBLE(bool) operator!=(const C<T> &a, const E<U> &b) {
|
||||
return a.raw_bytes(0) != b.raw_bytes(0);
|
||||
}
|
||||
#endif
|
||||
#endif // if 0 // already handled by member functions
|
||||
|
||||
#endif // XSPAN_FWD_C_IS_MEMBUFFER
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user