aboutsummaryrefslogtreecommitdiffstats
path: root/sources
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-11-07 16:23:22 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-11-07 19:44:13 +0000
commit772b459cbeead82fda12e7d59a33f57c0cebbc72 (patch)
treee80efc7db90efb869aed78339b1ad73bd5b56aea /sources
parent764498b3d033a1c947a40dc1b2237e81b674992b (diff)
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 <alexandru.croitor@qt.io>
Diffstat (limited to 'sources')
-rw-r--r--sources/shiboken2/libshiboken/voidptr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken2/libshiboken/voidptr.cpp b/sources/shiboken2/libshiboken/voidptr.cpp
index ad2a5735..7997839e 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<SbkVoidPtrObject *>(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)) {