From efe90be8d6592c843ee422e5a23949d6d12f14a0 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 7 Sep 2021 02:35:48 +0100 Subject: Fix at least public facing old-style casts --- slicer/slicer/modelPartsTypes.impl.h | 6 +++--- slicer/slicer/slicer.cpp | 2 +- slicer/xml/serializer.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/slicer/slicer/modelPartsTypes.impl.h b/slicer/slicer/modelPartsTypes.impl.h index 706f050..dc97148 100644 --- a/slicer/slicer/modelPartsTypes.impl.h +++ b/slicer/slicer/modelPartsTypes.impl.h @@ -210,7 +210,7 @@ namespace Slicer { ModelPartForConverted, M, MV>::HasValue() const { BOOST_ASSERT(this->Model); - return (bool)*this->Model; + return !!*this->Model; } template @@ -288,7 +288,7 @@ namespace Slicer { ModelPartForOptional::hasModel() const { BOOST_ASSERT(this->Model); - return (bool)*this->Model; + return !!*this->Model; } template @@ -442,7 +442,7 @@ namespace Slicer { ModelPartForClass::HasValue() const { BOOST_ASSERT(this->Model); - return (bool)*this->Model; + return !!*this->Model; } template diff --git a/slicer/slicer/slicer.cpp b/slicer/slicer/slicer.cpp index f6d6fa6..1d5118c 100644 --- a/slicer/slicer/slicer.cpp +++ b/slicer/slicer/slicer.cpp @@ -17,7 +17,7 @@ namespace Slicer { Slicer::ChildRef::operator bool() const { - return (bool)mpp; + return !!mpp; } const Metadata & diff --git a/slicer/xml/serializer.cpp b/slicer/xml/serializer.cpp index 9bae723..3a4b5bb 100644 --- a/slicer/xml/serializer.cpp +++ b/slicer/xml/serializer.cpp @@ -123,7 +123,7 @@ namespace Slicer { void get(const Ice::Byte & value) const override { - apply(boost::lexical_cast((int)value)); + apply(boost::lexical_cast(value)); } void -- cgit v1.2.3