diff options
author | David Tardon <dtardon@redhat.com> | 2010-12-19 09:56:23 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2010-12-19 09:56:23 +0100 |
commit | 51b4ffc34a86e7b4387b3f33dfe8504705283755 (patch) | |
tree | 0d7e615e086da422fa14b136dd25d15406fd0bfb /sal/workben | |
parent | c1d5abdc81822878ec239af7088b8997838044b1 (diff) |
this is perf. test, so OUString::createFromAscii must stay here
Diffstat (limited to 'sal/workben')
-rw-r--r-- | sal/workben/measure_oustrings.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sal/workben/measure_oustrings.cxx b/sal/workben/measure_oustrings.cxx index f99b06c0727f..bff7d6dea096 100644 --- a/sal/workben/measure_oustrings.cxx +++ b/sal/workben/measure_oustrings.cxx @@ -53,7 +53,7 @@ SAL_IMPLEMENT_MAIN() //get my cpu fan up to speed :-) for (int i = 0; i < 10000000; ++i) { - rtl::OUString sFoo(RTL_CONSTASCII_USTRINGPARAM("X")); + rtl::OUString sFoo(rtl::OUString::createFromAscii("X")); rtl::OUString sBar(RTL_CONSTASCII_USTRINGPARAM("X")); #ifdef SAL_DECLARE_UTF16 rtl::OUString sBoo(RTL_CONSTASCII_USTRINGPARAM_WIDE("X")); @@ -75,7 +75,7 @@ SAL_IMPLEMENT_MAIN() { sal_uInt32 nStartTime = osl_getGlobalTimer(); for (int i = 0; i < 100000000; ++i) - rtl::OUString sFoo(OUString()); + rtl::OUString sFoo(rtl::OUString::createFromAscii("")); sal_uInt32 nEndTime = osl_getGlobalTimer(); std::cout << "rtl::OUString::createFromAscii() " << nEndTime - nStartTime << "ms" << std::endl; } @@ -85,7 +85,7 @@ SAL_IMPLEMENT_MAIN() { sal_uInt32 nStartTime = osl_getGlobalTimer(); for (int i = 0; i < 100000000; ++i) - rtl::OUString sFoo(RTL_CONSTASCII_USTRINGPARAM("X")); + rtl::OUString sFoo(rtl::OUString::createFromAscii("X")); sal_uInt32 nEndTime = osl_getGlobalTimer(); std::cout << "rtl::OUString::createFromAscii(\"X\") " << nEndTime - nStartTime << "ms" << std::endl; } @@ -120,7 +120,7 @@ SAL_IMPLEMENT_MAIN() { sal_uInt32 nStartTime = osl_getGlobalTimer(); for (int i = 0; i < 100000000; ++i) - rtl::OUString sFoo(RTL_CONSTASCII_USTRINGPARAM("XXXXXXXXXXXXXXX")); + rtl::OUString sFoo(rtl::OUString::createFromAscii("XXXXXXXXXXXXXXX")); sal_uInt32 nEndTime = osl_getGlobalTimer(); std::cout << "rtl::OUString::createFromAscii(\"XXXXXXXX\") " << nEndTime - nStartTime << "ms" << std::endl; } |