summaryrefslogtreecommitdiff
path: root/include/comphelper
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-10-21 19:56:59 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-10-21 20:28:43 +0200
commit7b2ea917cecbaa7deb67559fe09531bb2a3d98eb (patch)
tree9c4cf54910b874a77222d83641f255a6f3e2c9d1 /include/comphelper
parentaa963e6273541e81921dffda85cb1a42ce8e6de4 (diff)
Optimize JsonToPropertyValues a bit
1. Make it take string view: helps to avoid extra string allocation e.g. in desktop::jsonToPropertyValuesVector, and will help more, when C++26 stringstream ctor taking string view is available. 2. Factor out a function taking boost::property_tree::ptree, making implementation simpler for [][]com.sun.star.beans.PropertyValue and []com.sun.star.beans.PropertyValue, without writing a child node to a JSON string, and parsing it again. Change-Id: I16ac2641633ea67a7c9c054c9df09a790500e6fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175361 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/comphelper')
-rw-r--r--include/comphelper/propertysequence.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/comphelper/propertysequence.hxx b/include/comphelper/propertysequence.hxx
index e788f56f428f..787f96f3e855 100644
--- a/include/comphelper/propertysequence.hxx
+++ b/include/comphelper/propertysequence.hxx
@@ -53,7 +53,7 @@ namespace comphelper
return vResult;
}
- COMPHELPER_DLLPUBLIC std::vector<css::beans::PropertyValue> JsonToPropertyValues(const OString& rJson);
+ COMPHELPER_DLLPUBLIC std::vector<css::beans::PropertyValue> JsonToPropertyValues(std::string_view rJson);
} // namespace comphelper