summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-03 09:22:57 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-03 11:57:03 +0100
commit23c8da878529f85ba5045db6f7ea7956a64dfc72 (patch)
tree9a3d2cd902bb270fc3b34068eff8bd6d13a9a06e /extensions
parent7ab9d4caddcf3e2b4e1f5541ebd85f4559bff615 (diff)
put the message into static_assert
and use more static_assert where its obviously possible Change-Id: I9466130809acab12505f0760f970793991564165 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124633 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index a783f1e49bd0..ebb30470a6db 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -519,7 +519,7 @@ namespace pcr
if( ! (_rControlValue >>= sControlValue) )
SAL_WARN("extensions.propctrlr", "convertToControlValue: unable to get property for Show/Hide");
- assert(SAL_N_ELEMENTS(RID_RSC_ENUM_SHOWHIDE) == 2 && "FormComponentPropertyHandler::convertToPropertyValue: broken resource for Show/Hide!");
+ static_assert(SAL_N_ELEMENTS(RID_RSC_ENUM_SHOWHIDE), "FormComponentPropertyHandler::convertToPropertyValue: broken resource for Show/Hide!");
bool bShow = sControlValue == PcrRes(RID_RSC_ENUM_SHOWHIDE[1]);
aPropertyValue <<= bShow;
@@ -627,7 +627,7 @@ namespace pcr
case PROPERTY_ID_SHOW_RECORDACTIONS:
case PROPERTY_ID_SHOW_FILTERSORT:
{
- assert(SAL_N_ELEMENTS(RID_RSC_ENUM_SHOWHIDE) == 2 && "FormComponentPropertyHandler::convertToPropertyValue: broken resource for Show/Hide!");
+ static_assert(SAL_N_ELEMENTS(RID_RSC_ENUM_SHOWHIDE) == 2, "FormComponentPropertyHandler::convertToPropertyValue: broken resource for Show/Hide!");
OUString sControlValue = ::comphelper::getBOOL(_rPropertyValue)
? PcrRes(RID_RSC_ENUM_SHOWHIDE[1])
: PcrRes(RID_RSC_ENUM_SHOWHIDE[0]);