]> granicus.if.org Git - icu/commitdiff
ICU-8728 remove redundant U_RELEASE, use U_DEBUG instead
authorMarkus Scherer <markus.icu@gmail.com>
Wed, 27 Jul 2011 20:16:07 +0000 (20:16 +0000)
committerMarkus Scherer <markus.icu@gmail.com>
Wed, 27 Jul 2011 20:16:07 +0000 (20:16 +0000)
X-SVN-Rev: 30431

icu4c/source/common/stringtriebuilder.cpp
icu4c/source/common/uassert.h
icu4c/source/common/umutex.c
icu4c/source/common/unicode/uconfig.h

index 536ce9e64884f58041ffc3cc61725100628ace1d..327661825d3efb27a53df8a5da64df09049fe022 100644 (file)
@@ -329,7 +329,7 @@ StringTrieBuilder::registerNode(Node *newNode, UErrorCode &errorCode) {
     }
     // If uhash_puti() returns a non-zero value from an equivalent, previously
     // registered node, then uhash_find() failed to find that and we will leak newNode.
-#if !U_RELEASE
+#if U_DEBUG
     int32_t oldValue=  // Only in debug mode to avoid a compiler warning about unused oldValue.
 #endif
     uhash_puti(nodes, newNode, 1, &errorCode);
@@ -358,7 +358,7 @@ StringTrieBuilder::registerFinalValue(int32_t value, UErrorCode &errorCode) {
     }
     // If uhash_puti() returns a non-zero value from an equivalent, previously
     // registered node, then uhash_find() failed to find that and we will leak newNode.
-#if !U_RELEASE
+#if U_DEBUG
     int32_t oldValue=  // Only in debug mode to avoid a compiler warning about unused oldValue.
 #endif
     uhash_puti(nodes, newNode, 1, &errorCode);
index 9b1a14168fb684106783d33d1a3c662ddf8985b9..9dc29b242b5049d48fe39c6ea7dec6f7db571cc7 100644 (file)
@@ -1,7 +1,7 @@
 /*
 ******************************************************************************
 *
-*   Copyright (C) 2002-2003, International Business Machines
+*   Copyright (C) 2002-2011, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 ******************************************************************************
 #define U_ASSERT_H
 /* utypes.h is included to get the proper define for uint8_t */
 #include "unicode/utypes.h"
-#if U_RELEASE
-#define U_ASSERT(exp)
+#if U_DEBUG
+#   include <assert.h>
+#   define U_ASSERT(exp) assert(exp)
 #else
-#include <assert.h>
-#define U_ASSERT(exp) assert(exp)
+#   define U_ASSERT(exp)
 #endif
 #endif
 
index 5be6eb95ef532e2267c739cfff63ce6c5b019a0d..1c1d1d32be4d01cf59ac3ef60512fcac57bb9e49 100644 (file)
@@ -560,7 +560,7 @@ u_setAtomicIncDecFunctions(const void *context, UMtxAtomicFn *ip, UMtxAtomicFn *
     pDecFn = dp;
     gIncDecContext = context;
 
-#if !U_RELEASE
+#if U_DEBUG
     {
         int32_t   testInt = 0;
         U_ASSERT(umtx_atomic_inc(&testInt) == 1);     /* Sanity Check.    Do the functions work at all? */
index 5da685e88cf22323e4e081c88c51d237ef3970a5..177747aadf29dbd48278428c717f876fd160d42a 100644 (file)
      * which disables assert().
      */
 #   define U_DEBUG 1
-#elif defined(U_RELEASE)
-#   define U_DEBUG (!U_RELEASE)
 # else
 #   define U_DEBUG 0
 #endif
 
-/**
- * \def U_DEBUG
- * Opposite of U_DEBUG.
- * @internal
- */
-#ifndef U_RELEASE
-#define U_RELEASE (!U_DEBUG)
-#endif
-
 /**
  * Determines wheter to enable auto cleanup of libraries. 
  * @internal