Turn OSL_ENSURE() into static_assert() for NUM_PAPER_ENTRIES enum match

And remove now obsolete include of osl/diagnose.h

Change-Id: Ie75a4da463a5c51c6bd763d4a6ecf37be94ff6b2
This commit is contained in:
Eike Rathke 2017-07-12 12:56:51 +02:00
parent 20dcd4730d
commit d65567230f

View file

@ -18,7 +18,6 @@
*/
#include <osl/diagnose.h>
#include <officecfg/Setup.hxx>
#include <officecfg/System.hxx>
#include <sal/config.h>
@ -348,7 +347,7 @@ PaperInfo PaperInfo::getSystemDefaultPaper()
PaperInfo::PaperInfo(Paper eType) : m_eType(eType)
{
OSL_ENSURE( SAL_N_ELEMENTS(aDinTab) == NUM_PAPER_ENTRIES,
static_assert( SAL_N_ELEMENTS(aDinTab) == NUM_PAPER_ENTRIES,
"mismatch between array entries and enum values" );
m_nPaperWidth = aDinTab[m_eType].m_nWidth;