From e8145768dfdc22e5dc3b16cda0c34906828dd520 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Fri, 20 Jan 2017 17:03:51 +0700 Subject: [PATCH] Add ObjectHandle::isNotNull() --- src/Graphics/ObjectHandle.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Graphics/ObjectHandle.h b/src/Graphics/ObjectHandle.h index 6cf4949c..f9e66edc 100644 --- a/src/Graphics/ObjectHandle.h +++ b/src/Graphics/ObjectHandle.h @@ -12,6 +12,9 @@ namespace graphics { bool operator==(const ObjectHandle & _other) const { return m_name == _other.m_name; } bool operator!=(const ObjectHandle & _other) const { return m_name != _other.m_name; } + + bool isNotNull() const { return m_name != 0; } + void reset() { m_name = 0; } private: