Loading include/cutils/log.h +7 −4 Original line number Diff line number Diff line Loading @@ -389,10 +389,13 @@ extern "C" { * Assertion that generates a log message when the assertion fails. * Stripped out of release builds. Uses the current LOG_TAG. */ #ifndef ALOG_ASSERT #define ALOG_ASSERT(cond, ...) LOG_FATAL_IF(!(cond), ## __VA_ARGS__) //#define ALOG_ASSERT(cond) LOG_FATAL_IF(!(cond), "Assertion failed: " #cond) // Temporary measure for code still using old LOG macros. #ifndef LOG_ASSERT #define LOG_ASSERT(cond, ...) LOG_FATAL_IF(!(cond), ## __VA_ARGS__) //#define LOG_ASSERT(cond) LOG_FATAL_IF(!(cond), "Assertion failed: " #cond) #define ALOG_ASSERT LOG_ASSERT #define LOG_ASSERT ALOG_ASSERT #endif #endif // --------------------------------------------------------------------- Loading Loading @@ -493,7 +496,7 @@ typedef enum { __android_log_vprint(prio, tag, fmt) /* XXX Macros to work around syntax errors in places where format string * arg is not passed to LOG_ASSERT, LOG_ALWAYS_FATAL or LOG_ALWAYS_FATAL_IF * arg is not passed to ALOG_ASSERT, LOG_ALWAYS_FATAL or LOG_ALWAYS_FATAL_IF * (happens only in debug builds). */ Loading libpixelflinger/tinyutils/VectorImpl.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ VectorImpl::VectorImpl(const VectorImpl& rhs) VectorImpl::~VectorImpl() { LOG_ASSERT(!mCount, ALOG_ASSERT(!mCount, "[%p] " "subclasses of VectorImpl must call finish_vector()" " in their destructor. Leaking %d bytes.", Loading @@ -67,7 +67,7 @@ VectorImpl::~VectorImpl() VectorImpl& VectorImpl::operator = (const VectorImpl& rhs) { LOG_ASSERT(mItemSize == rhs.mItemSize, ALOG_ASSERT(mItemSize == rhs.mItemSize, "Vector<> have different types (this=%p, rhs=%p)", this, &rhs); if (this != &rhs) { release_storage(); Loading Loading @@ -176,7 +176,7 @@ ssize_t VectorImpl::replaceAt(size_t index) ssize_t VectorImpl::replaceAt(const void* prototype, size_t index) { LOG_ASSERT(index<size(), ALOG_ASSERT(index<size(), "[%p] replace: index=%d, size=%d", this, (int)index, (int)size()); void* item = editItemLocation(index); Loading @@ -193,7 +193,7 @@ ssize_t VectorImpl::replaceAt(const void* prototype, size_t index) ssize_t VectorImpl::removeItemsAt(size_t index, size_t count) { LOG_ASSERT((index+count)<=size(), ALOG_ASSERT((index+count)<=size(), "[%p] remove: index=%d, count=%d, size=%d", this, (int)index, (int)count, (int)size()); Loading @@ -217,7 +217,7 @@ void VectorImpl::clear() void* VectorImpl::editItemLocation(size_t index) { LOG_ASSERT(index<capacity(), ALOG_ASSERT(index<capacity(), "[%p] itemLocation: index=%d, capacity=%d, count=%d", this, (int)index, (int)capacity(), (int)mCount); Loading @@ -229,7 +229,7 @@ void* VectorImpl::editItemLocation(size_t index) const void* VectorImpl::itemLocation(size_t index) const { LOG_ASSERT(index<capacity(), ALOG_ASSERT(index<capacity(), "[%p] editItemLocation: index=%d, capacity=%d, count=%d", this, (int)index, (int)capacity(), (int)mCount); Loading Loading
include/cutils/log.h +7 −4 Original line number Diff line number Diff line Loading @@ -389,10 +389,13 @@ extern "C" { * Assertion that generates a log message when the assertion fails. * Stripped out of release builds. Uses the current LOG_TAG. */ #ifndef ALOG_ASSERT #define ALOG_ASSERT(cond, ...) LOG_FATAL_IF(!(cond), ## __VA_ARGS__) //#define ALOG_ASSERT(cond) LOG_FATAL_IF(!(cond), "Assertion failed: " #cond) // Temporary measure for code still using old LOG macros. #ifndef LOG_ASSERT #define LOG_ASSERT(cond, ...) LOG_FATAL_IF(!(cond), ## __VA_ARGS__) //#define LOG_ASSERT(cond) LOG_FATAL_IF(!(cond), "Assertion failed: " #cond) #define ALOG_ASSERT LOG_ASSERT #define LOG_ASSERT ALOG_ASSERT #endif #endif // --------------------------------------------------------------------- Loading Loading @@ -493,7 +496,7 @@ typedef enum { __android_log_vprint(prio, tag, fmt) /* XXX Macros to work around syntax errors in places where format string * arg is not passed to LOG_ASSERT, LOG_ALWAYS_FATAL or LOG_ALWAYS_FATAL_IF * arg is not passed to ALOG_ASSERT, LOG_ALWAYS_FATAL or LOG_ALWAYS_FATAL_IF * (happens only in debug builds). */ Loading
libpixelflinger/tinyutils/VectorImpl.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ VectorImpl::VectorImpl(const VectorImpl& rhs) VectorImpl::~VectorImpl() { LOG_ASSERT(!mCount, ALOG_ASSERT(!mCount, "[%p] " "subclasses of VectorImpl must call finish_vector()" " in their destructor. Leaking %d bytes.", Loading @@ -67,7 +67,7 @@ VectorImpl::~VectorImpl() VectorImpl& VectorImpl::operator = (const VectorImpl& rhs) { LOG_ASSERT(mItemSize == rhs.mItemSize, ALOG_ASSERT(mItemSize == rhs.mItemSize, "Vector<> have different types (this=%p, rhs=%p)", this, &rhs); if (this != &rhs) { release_storage(); Loading Loading @@ -176,7 +176,7 @@ ssize_t VectorImpl::replaceAt(size_t index) ssize_t VectorImpl::replaceAt(const void* prototype, size_t index) { LOG_ASSERT(index<size(), ALOG_ASSERT(index<size(), "[%p] replace: index=%d, size=%d", this, (int)index, (int)size()); void* item = editItemLocation(index); Loading @@ -193,7 +193,7 @@ ssize_t VectorImpl::replaceAt(const void* prototype, size_t index) ssize_t VectorImpl::removeItemsAt(size_t index, size_t count) { LOG_ASSERT((index+count)<=size(), ALOG_ASSERT((index+count)<=size(), "[%p] remove: index=%d, count=%d, size=%d", this, (int)index, (int)count, (int)size()); Loading @@ -217,7 +217,7 @@ void VectorImpl::clear() void* VectorImpl::editItemLocation(size_t index) { LOG_ASSERT(index<capacity(), ALOG_ASSERT(index<capacity(), "[%p] itemLocation: index=%d, capacity=%d, count=%d", this, (int)index, (int)capacity(), (int)mCount); Loading @@ -229,7 +229,7 @@ void* VectorImpl::editItemLocation(size_t index) const void* VectorImpl::itemLocation(size_t index) const { LOG_ASSERT(index<capacity(), ALOG_ASSERT(index<capacity(), "[%p] editItemLocation: index=%d, capacity=%d, count=%d", this, (int)index, (int)capacity(), (int)mCount); Loading