Changed `debug` target: Now uses -Og instead of -O0.

Added -DDEBUG-only redundant-initializers for vars `minmax_t()::{lowest, highest}`

Fortune for shuffle3's current commit: Future blessing − 末吉
progress
Avril 2 years ago
parent 454378acfe
commit 16ae82f05d
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -34,7 +34,7 @@ RELEASE_CFLAGS?= -O3 -flto $(OPT_FLAGS) $(RELEASE_COMMON_FLAGS)
RELEASE_CXXFLAGS?= -O3 -flto $(CXX_OPT_FLAGS) $(RELEASE_COMMON_FLAGS)
RELEASE_LDFLAGS?= -Wl,-O3 -Wl,-flto
DEBUG_CFLAGS?= -O0 -g -DDEBUG
DEBUG_CFLAGS?= -Og -g -DDEBUG
DEBUG_CXXFLAGS?= $(DEBUG_CFLAGS)
DEBUG_LDFLAGS?=

@ -15,8 +15,16 @@
template<typename T, typename Fn>
std::tuple<T, T> minmax_t(const span<T>& array, Fn keep)
{
T highest;
T lowest;
T highest
#ifdef DEBUG
{}
#endif
;
T lowest
#ifdef DEBUG
{}
#endif
;
bool init=false;
D_dprintf("minmax_t: %p (%lu)", array.as_ptr(), array.size());
for(std::size_t i=0;i<array.size();i++)

Loading…
Cancel
Save