From ceabb17306f4de9850516dae96bb0d2d5853f028 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Mon, 9 Jan 2012 18:31:54 +0000 Subject: [PATCH] Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE Bug: 5449033 Change-Id: I991dc84c366d8f33e5439894c23df561bbc50b83 --- include/cutils/log.h | 9 ++++----- libpixelflinger/tinyutils/VectorImpl.cpp | 12 ++++++------ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/include/cutils/log.h b/include/cutils/log.h index 512390192..878952e05 100644 --- a/include/cutils/log.h +++ b/include/cutils/log.h @@ -329,10 +329,9 @@ extern "C" { * Assertion that generates a log message when the assertion fails. * Stripped out of release builds. Uses the current LOG_TAG. */ -#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 +#ifndef ALOG_ASSERT +#define ALOG_ASSERT(cond, ...) LOG_FATAL_IF(!(cond), ## __VA_ARGS__) +//#define ALOG_ASSERT(cond) LOG_FATAL_IF(!(cond), "Assertion failed: " #cond) #endif // --------------------------------------------------------------------- @@ -425,7 +424,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). */ diff --git a/libpixelflinger/tinyutils/VectorImpl.cpp b/libpixelflinger/tinyutils/VectorImpl.cpp index be3d27023..05c4945b6 100644 --- a/libpixelflinger/tinyutils/VectorImpl.cpp +++ b/libpixelflinger/tinyutils/VectorImpl.cpp @@ -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.", @@ -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(); @@ -176,7 +176,7 @@ ssize_t VectorImpl::replaceAt(size_t index) ssize_t VectorImpl::replaceAt(const void* prototype, size_t index) { - LOG_ASSERT(index