[Libreoffice-commits] .: sal/workben
David Tardon
dtardon at kemper.freedesktop.org
Sun Dec 19 00:58:19 PST 2010
sal/workben/measure_oustrings.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit f88a59151b594ae1789cb92a6a46c982e752063c
Author: David Tardon <dtardon at redhat.com>
Date: Sun Dec 19 09:56:23 2010 +0100
this is perf. test, so OUString::createFromAscii must stay here
diff --git a/sal/workben/measure_oustrings.cxx b/sal/workben/measure_oustrings.cxx
index f99b06c..bff7d6d 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;
}
More information about the Libreoffice-commits
mailing list