diff --git a/include/nana/paint/graphics.hpp b/include/nana/paint/graphics.hpp index 7d6d6df8..9ce35704 100644 --- a/include/nana/paint/graphics.hpp +++ b/include/nana/paint/graphics.hpp @@ -85,13 +85,13 @@ namespace nana bool changed() const; ///< Returns true if the graphics object is operated bool empty() const; ///< Returns true if the graphics object does not refer to any resource. - operator const void*() const; + explicit operator bool() const noexcept; drawable_type handle() const; const void* pixmap() const; const void* context() const; - void swap(graphics& other); + void swap(graphics& other) noexcept; /// Creates a graphics/drawable resource /** diff --git a/source/paint/graphics.cpp b/source/paint/graphics.cpp index a048423c..00cb26de 100644 --- a/source/paint/graphics.cpp +++ b/source/paint/graphics.cpp @@ -269,7 +269,7 @@ namespace paint return (!impl_->handle); } - graphics::operator const void *() const + graphics::operator bool() const { return impl_->handle; }