diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-02-06 12:27:45 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-02-06 17:07:23 +0100 |
commit | 0a5d4dc25c5521de221f63dbc47c6ba79a51f8fb (patch) | |
tree | c076915c9fef892c3e9e14c55b8c1593d09f6b43 /comphelper | |
parent | b9a46c1ec295fe3227a5adb864c849e55838e89e (diff) |
elide some OString temporaries
Change-Id: I2ecb6af11c95605c84e935b850fe94a1831a1497
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163043
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/sequenceashashmap.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/comphelper/source/misc/sequenceashashmap.cxx b/comphelper/source/misc/sequenceashashmap.cxx index 270c005db259..db2c99a7a814 100644 --- a/comphelper/source/misc/sequenceashashmap.cxx +++ b/comphelper/source/misc/sequenceashashmap.cxx @@ -77,7 +77,7 @@ uno::Any jsonToUnoAny(const boost::property_tree::ptree& aTree) else if (aTypeClass == uno::TypeClass_BYTE) aAny <<= static_cast<sal_Int8>(o3tl::toInt32(rValue)); else if (aTypeClass == uno::TypeClass_BOOLEAN) - aAny <<= OString(rValue).toBoolean(); + aAny <<= rtl_str_toBoolean(rValue.c_str()); else if (aTypeClass == uno::TypeClass_SHORT) aAny <<= static_cast<sal_Int16>(o3tl::toInt32(rValue)); else if (aTypeClass == uno::TypeClass_UNSIGNED_SHORT) @@ -87,7 +87,7 @@ uno::Any jsonToUnoAny(const boost::property_tree::ptree& aTree) else if (aTypeClass == uno::TypeClass_UNSIGNED_LONG) aAny <<= static_cast<sal_uInt32>(o3tl::toInt32(rValue)); else if (aTypeClass == uno::TypeClass_FLOAT) - aAny <<= OString(rValue).toFloat(); + aAny <<= rtl_str_toFloat(rValue.c_str()); else if (aTypeClass == uno::TypeClass_DOUBLE) aAny <<= o3tl::toDouble(rValue); else if (aTypeClass == uno::TypeClass_STRING) @@ -325,9 +325,9 @@ std::vector<css::beans::PropertyValue> JsonToPropertyValues(const OString& rJson if (rType == "string") aValue.Value <<= OUString::fromUtf8(rValue); else if (rType == "boolean") - aValue.Value <<= OString(rValue).toBoolean(); + aValue.Value <<= rtl_str_toBoolean(rValue.c_str()); else if (rType == "float") - aValue.Value <<= OString(rValue).toFloat(); + aValue.Value <<= rtl_str_toFloat(rValue.c_str()); else if (rType == "long") aValue.Value <<= o3tl::toInt32(rValue); else if (rType == "short") @@ -341,7 +341,7 @@ std::vector<css::beans::PropertyValue> JsonToPropertyValues(const OString& rJson else if (rType == "int16") aValue.Value <<= sal_Int16(o3tl::toInt32(rValue)); else if (rType == "uint64") - aValue.Value <<= OString(rValue).toUInt64(); + aValue.Value <<= rtl_str_toUInt64(rValue.c_str(), 10); else if (rType == "uint32") aValue.Value <<= o3tl::toUInt32(rValue); else if (rType == "uint16") |