diff options
author | Kenneth Venken <kenneth.venken@gmail.com> | 2010-10-18 12:28:33 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2010-10-18 12:28:33 +0200 |
commit | bbe30ed8144fbfee7500b98a67224731c581663e (patch) | |
tree | 69c3c4238eb51d2be523c9eb9e1e2a498c36b9cf /svl/qa | |
parent | 309b89b93489c785a7ed2460ad5064ff0422dfd3 (diff) |
replace sizeof(foo)/sizeof(foo[0]) by SAL_N_ELEMENTS
Diffstat (limited to 'svl/qa')
-rw-r--r-- | svl/qa/test_URIHelper.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/svl/qa/test_URIHelper.cxx b/svl/qa/test_URIHelper.cxx index cbd7eaaede66..06b2eb27d234 100644 --- a/svl/qa/test_URIHelper.cxx +++ b/svl/qa/test_URIHelper.cxx @@ -64,6 +64,7 @@ #include "rtl/ustring.h" #include "rtl/ustring.hxx" #include "sal/types.h" +#include <sal/macros.h> #include "tools/solar.h" #include "unotools/charclass.hxx" @@ -285,7 +286,7 @@ void Test::testNormalizedMakeRelative() { "nonex3/nonex4" } #endif }; - for (std::size_t i = 0; i < sizeof tests / sizeof tests[0]; ++i) { + for (std::size_t i = 0; i < SAL_N_ELEMENTS(tests); ++i) { css::uno::Reference< css::uri::XUriReference > ref( URIHelper::normalizedMakeRelative( m_context, rtl::OUString::createFromAscii(tests[i].base), @@ -415,7 +416,7 @@ void Test::testFindFirstURLInText() { com::sun::star::lang::Locale( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("en")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("US")), rtl::OUString())); - for (std::size_t i = 0; i < sizeof tests / sizeof tests[0]; ++i) { + for (std::size_t i = 0; i < SAL_N_ELEMENTS(tests); ++i) { rtl::OUString input(rtl::OUString::createFromAscii(tests[i].input)); xub_StrLen begin = 0; xub_StrLen end = static_cast< xub_StrLen >(input.getLength()); |