Bug 1316978 - Suppress nullptr-to-bool cast warning - r=froydnj

MozReview-Commit-ID: BweUO5stduw

--HG--
extra : rebase_source : 9f61f969007dc5680cbc0f8edc4f15d5f119cd4f
This commit is contained in:
Gerald Squelart 2016-11-12 09:53:39 +11:00
Родитель 92fb3b4b8f
Коммит 33ea8d877d
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -130,9 +130,11 @@ do { \
/* nsCOMPtr.h allows these macros to be defined by clients
* These logging functions require dynamic_cast<void*>, so they don't
* do anything useful if we don't have dynamic_cast<void*>. */
* do anything useful if we don't have dynamic_cast<void*>.
* Note: The explicit comparison to nullptr is needed to avoid warnings
* when _p is a nullptr itself. */
#define NSCAP_LOG_ASSIGNMENT(_c, _p) \
if (_p) \
if (_p != nullptr) \
NS_LogCOMPtrAddRef((_c),static_cast<nsISupports*>(_p))
#define NSCAP_LOG_RELEASE(_c, _p) \