summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-09-07 02:35:48 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-09-07 02:35:48 +0100
commitefe90be8d6592c843ee422e5a23949d6d12f14a0 (patch)
tree56703c1e1757f2f65de6aed22af8794e80216985
parentRename internal GetTypeId to getTypeId to avoid overloaded-virtual (diff)
downloadslicer-efe90be8d6592c843ee422e5a23949d6d12f14a0.tar.bz2
slicer-efe90be8d6592c843ee422e5a23949d6d12f14a0.tar.xz
slicer-efe90be8d6592c843ee422e5a23949d6d12f14a0.zip
Fix at least public facing old-style casts
-rw-r--r--slicer/slicer/modelPartsTypes.impl.h6
-rw-r--r--slicer/slicer/slicer.cpp2
-rw-r--r--slicer/xml/serializer.cpp2
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<Ice::optional<T>, M, MV>::HasValue() const
{
BOOST_ASSERT(this->Model);
- return (bool)*this->Model;
+ return !!*this->Model;
}
template<typename ET, typename MT, typename Conv>
@@ -288,7 +288,7 @@ namespace Slicer {
ModelPartForOptional<T>::hasModel() const
{
BOOST_ASSERT(this->Model);
- return (bool)*this->Model;
+ return !!*this->Model;
}
template<typename T>
@@ -442,7 +442,7 @@ namespace Slicer {
ModelPartForClass<T>::HasValue() const
{
BOOST_ASSERT(this->Model);
- return (bool)*this->Model;
+ return !!*this->Model;
}
template<typename T>
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<Glib::ustring>((int)value));
+ apply(boost::lexical_cast<Glib::ustring, int>(value));
}
void