From fe677fbcc1fed2665a278b4c8968baa696670e73 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 26 Apr 2020 14:40:38 +0100 Subject: Add a few more assertions --- slicer/slicer/modelPartsTypes.impl.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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 void ModelPartForClass::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 const std::string & ModelPartForClass::getTypeId(typename std::enable_if::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 std::string ModelPartForClass::getTypeId(typename std::enable_if::value>::type *) const { + // NOLINTNEXTLINE(hicpp-no-array-decay,-warnings-as-errors) + BOOST_ASSERT(this->Model); return ModelPartForComplexBase::demangle(typeid(*this->Model->get()).name()); } -- cgit v1.2.3