diff options
author | Kenneth Venken <kenneth.venken@gmail.com> | 2010-10-17 00:04:57 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2010-10-17 00:04:57 -0500 |
commit | 0196e3b7eb8e75dfd8482ebf54d35b12308d4416 (patch) | |
tree | a5dfd67a277f1e43910328c6a4b8a089e9b99364 /ure/source | |
parent | 7ed1d1de5eef6aad14d1ad7c3286bc7cba08a5d5 (diff) |
use SAL_N_ELEMENTS macro
Diffstat (limited to 'ure/source')
-rw-r--r-- | ure/source/uretest/cppmain.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ure/source/uretest/cppmain.cc b/ure/source/uretest/cppmain.cc index 0be81b637053..eeb0be153606 100644 --- a/ure/source/uretest/cppmain.cc +++ b/ure/source/uretest/cppmain.cc @@ -26,6 +26,7 @@ ************************************************************************/ #include "sal/config.h" +#include "sal/macros.h" #include <cstddef> #include <functional> @@ -179,7 +180,7 @@ private: ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("no service manager")), static_cast< ::cppu::OWeakObject * >(this)); } - for (::std::size_t i = 0; i < sizeof services / sizeof services[0]; ++i) { + for (::std::size_t i = 0; i < SAL_N_ELEMENTS(services); ++i) { ::css::uno::Reference< ::css::uno::XInterface > instance; try { instance = manager->createInstanceWithContext( @@ -200,7 +201,7 @@ private: } static char const * const singletons[] = { "com.sun.star.util.theMacroExpander" }; - for (::std::size_t i = 0; i < sizeof singletons / sizeof singletons[0]; ++i) + for (::std::size_t i = 0; i < SAL_N_ELEMENTS(singletons); ++i) { ::rtl::OUStringBuffer b; b.appendAscii(RTL_CONSTASCII_STRINGPARAM("/singletons/")); |