Merge pull request #346 from jpcima/checked-dbg

Check the validity of DBG() under release mode
This commit is contained in:
JP Cimalando 2020-08-09 20:30:53 +02:00 committed by GitHub
commit fe077d56a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,10 +64,10 @@
#endif
// Debug message
#if !defined(NDEBUG) || defined(SFIZZ_ENABLE_RELEASE_DBG)
#include <iostream>
#if !defined(NDEBUG) || defined(SFIZZ_ENABLE_RELEASE_DBG)
#include <iomanip>
#define DBG(ostream) do { std::cerr << std::fixed << std::setprecision(2) << ostream << '\n'; } while (0)
#else
#define DBG(ostream) do {} while (0)
#define DBG(ostream) do { if (0) { std::cerr << ostream; } } while (0)
#endif