summaryrefslogtreecommitdiff
path: root/svx/source
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 /svx/source
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 'svx/source')
-rw-r--r--svx/source/form/fmshimp.cxx2
-rw-r--r--svx/source/tbxctrls/extrusioncontrols.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index d974e9ad9484..cfaab66fa28b 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -1021,7 +1021,7 @@ void FmXFormShell::GetConversionMenu_Lock(weld::Menu& rNewMenu)
OString FmXFormShell::SlotToIdent(sal_uInt16 nSlot)
{
- assert(SAL_N_ELEMENTS(SelObjectSlotMap) >= SAL_N_ELEMENTS(aConvertSlots));
+ static_assert(SAL_N_ELEMENTS(SelObjectSlotMap) >= SAL_N_ELEMENTS(aConvertSlots));
for (size_t i = 0; i < SAL_N_ELEMENTS(aConvertSlots); ++i)
{
diff --git a/svx/source/tbxctrls/extrusioncontrols.cxx b/svx/source/tbxctrls/extrusioncontrols.cxx
index f30c123a42b0..ec639f77737b 100644
--- a/svx/source/tbxctrls/extrusioncontrols.cxx
+++ b/svx/source/tbxctrls/extrusioncontrols.cxx
@@ -402,7 +402,7 @@ void ExtrusionDepthWindow::implFillStrings( FieldUnit eUnit )
RID_SVXSTR_DEPTH_4_INCH
};
- assert(SAL_N_ELEMENTS(aDepths) == SAL_N_ELEMENTS(aDepthsInch));
+ static_assert(SAL_N_ELEMENTS(aDepths) == SAL_N_ELEMENTS(aDepthsInch));
const TranslateId* pResource = IsMetric(eUnit) ? aDepths : aDepthsInch;