From b0f21d2727246612489b1b5266b4ad2de69c6fc4 Mon Sep 17 00:00:00 2001 From: Fingolfin1196 Date: Wed, 10 Oct 2018 15:48:23 +0200 Subject: [PATCH 1/2] Update VImage8.h VObject now has an is_null check, which is then used in VImage. --- cplusplus/include/vips/VImage8.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cplusplus/include/vips/VImage8.h b/cplusplus/include/vips/VImage8.h index 11dcabbb..608db6cd 100644 --- a/cplusplus/include/vips/VImage8.h +++ b/cplusplus/include/vips/VImage8.h @@ -160,6 +160,11 @@ public: return( vobject ); } + bool is_null() const + { + return vobject == nullptr; + } + }; class VIPS_CPLUSPLUS_API VImage; @@ -237,6 +242,8 @@ public: class VImage : VObject { public: + using VObject::is_null; + VImage( VipsImage *image, VSteal steal = STEAL ) : VObject( (VipsObject *) image, steal ) { From c7f828e9682bae7a1347dd70787c89ca4222b15a Mon Sep 17 00:00:00 2001 From: Fingolfin1196 Date: Wed, 10 Oct 2018 15:57:50 +0200 Subject: [PATCH 2/2] Update VImage8.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Should fix the “nullptr undeclared” issue. --- cplusplus/include/vips/VImage8.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cplusplus/include/vips/VImage8.h b/cplusplus/include/vips/VImage8.h index 608db6cd..0ff2a615 100644 --- a/cplusplus/include/vips/VImage8.h +++ b/cplusplus/include/vips/VImage8.h @@ -162,7 +162,7 @@ public: bool is_null() const { - return vobject == nullptr; + return vobject == 0; } };