summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2020-04-26 14:40:38 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2020-04-26 14:40:38 +0100
commitfe677fbcc1fed2665a278b4c8968baa696670e73 (patch)
tree69c3ca722d3c366bc9fc0eab08295d3ee9bd9a8e
parentRemvoe some duplication in enums (diff)
downloadslicer-fe677fbcc1fed2665a278b4c8968baa696670e73.tar.bz2
slicer-fe677fbcc1fed2665a278b4c8968baa696670e73.tar.xz
slicer-fe677fbcc1fed2665a278b4c8968baa696670e73.zip
Add a few more assertions
-rw-r--r--slicer/slicer/modelPartsTypes.impl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/slicer/slicer/modelPartsTypes.impl.h b/slicer/slicer/modelPartsTypes.impl.h
index 0c1a92d..ebcceac 100644
--- a/slicer/slicer/modelPartsTypes.impl.h
+++ b/slicer/slicer/modelPartsTypes.impl.h
@@ -508,6 +508,8 @@ namespace Slicer {
template<typename T>
void ModelPartForClass<T>::unregisterClass()
{
+ // NOLINTNEXTLINE(hicpp-no-array-decay,-warnings-as-errors)
+ BOOST_ASSERT(className);
ModelPartForComplexBase::unregisterClass(*className, typeName);
deleteClassName();
}
@@ -518,6 +520,8 @@ namespace Slicer {
{
// NOLINTNEXTLINE(hicpp-no-array-decay,-warnings-as-errors)
BOOST_ASSERT(this->Model);
+ // NOLINTNEXTLINE(hicpp-no-array-decay,-warnings-as-errors)
+ BOOST_ASSERT(className);
return ModelPartForComplexBase::GetTypeId(getTypeId(), *className);
}
@@ -525,6 +529,8 @@ namespace Slicer {
template<typename dummy>
const std::string & ModelPartForClass<T>::getTypeId(typename std::enable_if<std::is_base_of<Ice::Object, dummy>::value>::type *) const
{
+ // NOLINTNEXTLINE(hicpp-no-array-decay,-warnings-as-errors)
+ BOOST_ASSERT(this->Model);
return (*this->Model)->ice_id();
}
@@ -532,6 +538,8 @@ namespace Slicer {
template<typename dummy>
std::string ModelPartForClass<T>::getTypeId(typename std::enable_if<!std::is_base_of<Ice::Object, dummy>::value>::type *) const
{
+ // NOLINTNEXTLINE(hicpp-no-array-decay,-warnings-as-errors)
+ BOOST_ASSERT(this->Model);
return ModelPartForComplexBase::demangle(typeid(*this->Model->get()).name());
}