summaryrefslogtreecommitdiff
path: root/sal/rtl
diff options
context:
space:
mode:
authorKenneth Venken <kenneth.venken@gmail.com>2010-10-17 00:04:57 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2010-10-17 00:04:57 -0500
commit0196e3b7eb8e75dfd8482ebf54d35b12308d4416 (patch)
treea5dfd67a277f1e43910328c6a4b8a089e9b99364 /sal/rtl
parent7ed1d1de5eef6aad14d1ad7c3286bc7cba08a5d5 (diff)
use SAL_N_ELEMENTS macro
Diffstat (limited to 'sal/rtl')
-rw-r--r--sal/rtl/source/uri.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sal/rtl/source/uri.cxx b/sal/rtl/source/uri.cxx
index c67b4fdd23b1..5044df311080 100644
--- a/sal/rtl/source/uri.cxx
+++ b/sal/rtl/source/uri.cxx
@@ -43,6 +43,7 @@
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#include "sal/types.h"
+#include "sal/macros.h"
#include <cstddef>
@@ -198,7 +199,7 @@ sal_uInt32 readUcs4(sal_Unicode const ** pBegin, sal_Unicode const * pEnd,
sal_Size nConverted;
sal_Size nDstSize = rtl_convertTextToUnicode(
aConverter, 0, aBuf.getStr(), aBuf.getLength(), aDst,
- sizeof aDst / sizeof aDst[0],
+ SAL_N_ELEMENTS( aDst ),
(RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
| RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
| RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR),
@@ -592,7 +593,7 @@ sal_Bool const * SAL_CALL rtl_getUriCharClass(rtl_UriCharClass eCharClass)
OSL_ENSURE(
(eCharClass >= 0
&& (sal::static_int_cast< std::size_t >(eCharClass)
- < sizeof aCharClass / sizeof aCharClass[0])),
+ < SAL_N_ELEMENTS(aCharClass))),
"bad eCharClass");
return aCharClass[eCharClass];
}