зеркало из https://github.com/mozilla/gecko-dev.git
Removed the #ifdef DEBUG around the definition of NS_ENSURE. The only difference between the two was the NS_ERROR. NS_ERROR is already conditional upon debug so this was a bit redundant.
This commit is contained in:
Родитель
9ecb0eb822
Коммит
80ec2cfdfb
|
@ -794,7 +794,6 @@ CallQueryInterface( nsISupports* aSource, DestinationType** aDestination )
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Macros for checking state and arguments upon entering interface boundaries
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#if defined(NS_DEBUG)
|
||||
|
||||
#define NS_ENSURE(x, ret) \
|
||||
PR_BEGIN_MACRO \
|
||||
|
@ -805,16 +804,6 @@ PR_BEGIN_MACRO \
|
|||
} \
|
||||
PR_END_MACRO
|
||||
|
||||
#else // !NS_DEBUG
|
||||
|
||||
#define NS_ENSURE(x, ret) \
|
||||
PR_BEGIN_MACRO \
|
||||
if(!(x)) \
|
||||
return ret; \
|
||||
PR_END_MACRO
|
||||
|
||||
#endif // !NS_DEBUG
|
||||
|
||||
#define NS_ENSURE_NOT(x, ret) \
|
||||
NS_ENSURE(!(x), ret)
|
||||
|
||||
|
|
|
@ -794,7 +794,6 @@ CallQueryInterface( nsISupports* aSource, DestinationType** aDestination )
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Macros for checking state and arguments upon entering interface boundaries
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#if defined(NS_DEBUG)
|
||||
|
||||
#define NS_ENSURE(x, ret) \
|
||||
PR_BEGIN_MACRO \
|
||||
|
@ -805,16 +804,6 @@ PR_BEGIN_MACRO \
|
|||
} \
|
||||
PR_END_MACRO
|
||||
|
||||
#else // !NS_DEBUG
|
||||
|
||||
#define NS_ENSURE(x, ret) \
|
||||
PR_BEGIN_MACRO \
|
||||
if(!(x)) \
|
||||
return ret; \
|
||||
PR_END_MACRO
|
||||
|
||||
#endif // !NS_DEBUG
|
||||
|
||||
#define NS_ENSURE_NOT(x, ret) \
|
||||
NS_ENSURE(!(x), ret)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче