remove (un-)definitions of NDEBUG from source files

The build system already defines NDEBUG only if OSL_DEBUG_LEVEL=0 AND
ASSERT_ALWAYS_ABORT=FALSE so the C++ code shouldn't override that.

Change-Id: Ie67a576646cc7e18c3ffac67a3c81b80747ea438
This commit is contained in:
Michael Stahl 2016-05-25 12:14:09 +02:00
parent 4384ee727c
commit fa63fe59a1
5 changed files with 1 additions and 33 deletions

View file

@ -22,15 +22,6 @@
#include <com/sun/star/io/BufferSizeExceededException.hpp>
// Save NDEBUG state
#ifdef NDEBUG
#define STREAMHELPER_HXX_HAD_NDEBUG
#undef NDEBUG
#endif
#if OSL_DEBUG_LEVEL == 0
#define NDEBUG
#endif
#include <assert.h>
#define Max( a, b ) (((a)>(b)) ? (a) : (b) )
@ -94,13 +85,6 @@ public:
};
// Restore NDEBUG state
#ifdef STREAMHELPER_HXX_HAD_NDEBUG
#define NDEBUG
#else
#undef NDEBUG
#endif
}
#endif // INCLUDED_IO_SOURCE_STM_STREAMHELPER_HXX

View file

@ -102,13 +102,7 @@
#include "lwpcelllayout.hxx"
// boost::polymorphic_downcast checks and reports (using assert), if the
// cast is incorrect. We want this in debug builds.
#if OSL_DEBUG_LEVEL > 0
# undef NDEBUG
#elif !defined(NDEBUG)
# define NDEBUG 1
#endif
// cast is incorrect (in debug builds).
using boost::polymorphic_downcast;
/**

View file

@ -24,11 +24,6 @@
*
*/
#if OSL_DEBUG_LEVEL == 0
# ifndef NDEBUG
# define NDEBUG
# endif
#endif
#include <assert.h>
#include "ttcr.hxx"

View file

@ -24,7 +24,6 @@
#if OSL_DEBUG_LEVEL > 1
#include <cstdio>
#define GRLAYOUT_DEBUG 1
#undef NDEBUG
#endif
//#define GRLAYOUT_DEBUG 1

View file

@ -911,7 +911,6 @@ static FILE * grLog()
else fflush(grLogFile);
return grLogFile;
}
#undef NDEBUG
#endif
const void * getGrTable(const void* appFaceHandle, unsigned int name, size_t *len)
@ -962,9 +961,6 @@ GrFontData::~GrFontData()
const void * GrFontData::getTable(unsigned int name, size_t *len) const
{
#ifdef DEBUG
#undef NDEBUG
#endif
assert(mhDC);
// swap the bytes
union TtfTag {