From 26394b7e5e7cbfa752d57e8f35576c054ea2baeb Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 15 May 2017 14:10:28 +0000 Subject: [PATCH] .cosmetics git-svn-id: svn://ultimatepp.org/upp/trunk@11088 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/GridCtrl/GridUtils.h | 4 +++- uppsrc/Web/util.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/uppsrc/GridCtrl/GridUtils.h b/uppsrc/GridCtrl/GridUtils.h index 6c919e0d5..b43691328 100644 --- a/uppsrc/GridCtrl/GridUtils.h +++ b/uppsrc/GridCtrl/GridUtils.h @@ -40,7 +40,9 @@ inline int32 Round(double a) #ifdef flagDEBUG #define LG LogGui #else -#define LG +inline void LG_Dummy_Nop__(int level, const char *fmt, ...) {} // needed to silence CLANG warnings +inline void LG_Dummy_Nop__(const char *fmt, ...) {} // about unused value +#define LG LG_Dummy_Nop__ #endif #define LGR LogGui diff --git a/uppsrc/Web/util.h b/uppsrc/Web/util.h index 41a9d0da2..0e00bfcf4 100644 --- a/uppsrc/Web/util.h +++ b/uppsrc/Web/util.h @@ -53,9 +53,9 @@ public: ASSERT(refcount == 0); } - void AddRef() const { if(this) AtomicInc(refcount); } + void AddRef() const { AtomicInc(refcount); } int GetRefCount() const { return refcount; } - void Release() const { if(this && !AtomicDec(refcount)) delete this; } + void Release() const { if(!AtomicDec(refcount)) delete this; } #ifdef REF_DEBUG int GetAllocIndex() const { return allocindex; } #endif//REF_DEBUG