summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-08-01 03:46:09 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2019-08-01 04:36:33 +0200
commit31fd67376ecc3b20b60d6c60eea0e01c1a9992e5 (patch)
tree8aaf995401034d50b3794b149be010f4cac3600b /sal
parent5c30c20101f72d973ff28c228f755e635cad14d5 (diff)
Sometimes static checks are enough.
Change-Id: I61e7a28c5beab8f0c619767545009cefae6ddcd9 Reviewed-on: https://gerrit.libreoffice.org/76772 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/w32/file_url.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sal/osl/w32/file_url.cxx b/sal/osl/w32/file_url.cxx
index 9ff2f95568af..65bcd70552ed 100644
--- a/sal/osl/w32/file_url.cxx
+++ b/sal/osl/w32/file_url.cxx
@@ -818,7 +818,8 @@ oslFileError osl_getFileURLFromSystemPath( rtl_uString* strPath, rtl_uString** p
{
case PATHTYPE_ABSOLUTE_UNC:
nIgnore = SAL_N_ELEMENTS( WSTR_LONG_PATH_PREFIX_UNC ) - 1;
- OSL_ENSURE( nIgnore == 8, "Unexpected long path UNC prefix!" );
+ static_assert(SAL_N_ELEMENTS(WSTR_LONG_PATH_PREFIX_UNC) - 1 == 8,
+ "Unexpected long path UNC prefix!");
/* generate the normal UNC path */
nLength = rtl_uString_getLength( strPath );
@@ -831,7 +832,8 @@ oslFileError osl_getFileURLFromSystemPath( rtl_uString* strPath, rtl_uString** p
case PATHTYPE_ABSOLUTE_LOCAL:
nIgnore = SAL_N_ELEMENTS( WSTR_LONG_PATH_PREFIX ) - 1;
- OSL_ENSURE( nIgnore == 4, "Unexpected long path prefix!" );
+ static_assert(SAL_N_ELEMENTS(WSTR_LONG_PATH_PREFIX) - 1 == 4,
+ "Unexpected long path prefix!");
/* generate the normal path */
nLength = rtl_uString_getLength( strPath );