From 772b459cbeead82fda12e7d59a33f57c0cebbc72 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 7 Nov 2017 16:23:22 +0100 Subject: voidptr.cpp: Assign bool directly Fix MVC warning: voidptr.cpp(90): warning C4804: '>': unsafe use of type 'bool' in operation Change-Id: I690becd76320d843e79a56ea792b65fa4cc9a498 Reviewed-by: Alexandru Croitor --- sources/shiboken2/libshiboken/voidptr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sources') diff --git a/sources/shiboken2/libshiboken/voidptr.cpp b/sources/shiboken2/libshiboken/voidptr.cpp index ad2a57358..7997839e4 100644 --- a/sources/shiboken2/libshiboken/voidptr.cpp +++ b/sources/shiboken2/libshiboken/voidptr.cpp @@ -87,7 +87,7 @@ int SbkVoidPtrObject_init(PyObject *self, PyObject *args, PyObject *kwds) SbkVoidPtrObject *sbkOther = reinterpret_cast(addressObject); sbkSelf->cptr = sbkOther->cptr; sbkSelf->size = sbkOther->size; - sbkSelf->isWritable = sbkOther->isWritable > 0 ? true : false; + sbkSelf->isWritable = sbkOther->isWritable; } // Shiboken::Object wrapper. else if (Shiboken::Object::checkType(addressObject)) { -- cgit v1.2.3