diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-14 12:50:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-14 17:50:11 +0000 |
commit | 899dfbca1755f730dc935ca0d929236f999b9879 (patch) | |
tree | 1bd455232191f057c088791145f0d1fb8329ce9d /unoxml | |
parent | e056c1ce10779b42ae17866913cf4db06b86a491 (diff) |
elide some temporary OStrings
where we can pass a string_view into OStringToOUString
Change-Id: If7803ba49aa15f6e9c7bd386d32fb84003155390
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148844
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoxml')
-rw-r--r-- | unoxml/source/dom/characterdata.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unoxml/source/dom/characterdata.cxx b/unoxml/source/dom/characterdata.cxx index d46ff5d7c587..fc58cc1f134f 100644 --- a/unoxml/source/dom/characterdata.cxx +++ b/unoxml/source/dom/characterdata.cxx @@ -88,7 +88,7 @@ namespace DOM // get current data std::shared_ptr<xmlChar const> const pContent( xmlNodeGetContent(m_aNodePtr), xmlFree); - OString aData(reinterpret_cast<char const*>(pContent.get())); + std::string_view aData(reinterpret_cast<char const*>(pContent.get())); OUString tmp(OStringToOUString(aData, RTL_TEXTENCODING_UTF8)); if (offset > tmp.getLength() || offset < 0 || count < 0) { DOMException e; @@ -158,7 +158,7 @@ namespace DOM // get current data std::shared_ptr<xmlChar const> const pContent( xmlNodeGetContent(m_aNodePtr), xmlFree); - OString aData(reinterpret_cast<char const*>(pContent.get())); + std::string_view aData(reinterpret_cast<char const*>(pContent.get())); OUString tmp(OStringToOUString(aData, RTL_TEXTENCODING_UTF8)); if (offset > tmp.getLength() || offset < 0) { DOMException e; @@ -193,7 +193,7 @@ namespace DOM // get current data std::shared_ptr<xmlChar const> const pContent( xmlNodeGetContent(m_aNodePtr), xmlFree); - OString aData(reinterpret_cast<char const*>(pContent.get())); + std::string_view aData(reinterpret_cast<char const*>(pContent.get())); OUString tmp(OStringToOUString(aData, RTL_TEXTENCODING_UTF8)); if (offset > tmp.getLength() || offset < 0 || count < 0){ DOMException e; @@ -246,7 +246,7 @@ namespace DOM // get current data std::shared_ptr<xmlChar const> const pContent( xmlNodeGetContent(m_aNodePtr), xmlFree); - OString aData(reinterpret_cast<char const*>(pContent.get())); + std::string_view aData(reinterpret_cast<char const*>(pContent.get())); OUString tmp(OStringToOUString(aData, RTL_TEXTENCODING_UTF8)); if (offset > tmp.getLength() || offset < 0 || count < 0) { DOMException e; |