From 5c1561561a859c561fb2321420f1abb7f1cedde3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 24 Apr 2023 11:37:48 +0200 Subject: loplugin:unnecessarygetstr extend to more std::string checking suggested by mike kaganski Change-Id: I5f5f254142767aca45a6101abdd84a0163ca6a34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150936 Tested-by: Jenkins Reviewed-by: Noel Grandin --- docmodel/source/theme/ThemeColorJSON.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docmodel') diff --git a/docmodel/source/theme/ThemeColorJSON.cxx b/docmodel/source/theme/ThemeColorJSON.cxx index 6b2293ca1f64..24b39fc190da 100644 --- a/docmodel/source/theme/ThemeColorJSON.cxx +++ b/docmodel/source/theme/ThemeColorJSON.cxx @@ -19,7 +19,7 @@ namespace model::theme bool convertFromJSON(OString const& rJsonString, model::ThemeColor& rThemeColor) { model::ThemeColor aThemeColor; - std::stringstream aStream(rJsonString.getStr()); + std::stringstream aStream((std::string(rJsonString))); boost::property_tree::ptree aRootTree; try { @@ -95,7 +95,7 @@ OString convertToJSON(model::ThemeColor const& rThemeColor) std::stringstream aStream; boost::property_tree::write_json(aStream, aTree); - return OString(aStream.str().c_str()); + return OString(aStream.str()); } } // end model::theme -- cgit