summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2019-02-17 23:32:22 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2019-03-05 22:29:03 +0100
commit730df730a9425dbf4ed778dce7a95c1c0be274f6 (patch)
tree98091786ae40fb9ea4b26d05530c3afb0ada95a0 /l10ntools
parent3cf1467379b2bad76a23e239051aa3a7852d786c (diff)
Avoid unneeded OUString copy
Change-Id: I43d66f1bf4fc4a17f7dbea62e3fb13675dbbfb8a Reviewed-on: https://gerrit.libreoffice.org/68119 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/xrmmerge.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index 4670dc7c3ab2..b6f7d388c31f 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -269,13 +269,10 @@ OString XRMResParser::GetAttribute( const OString &rToken, const OString &rAttri
sSearch += "=";
sal_Int32 nPos = sTmp.indexOf( sSearch );
- if ( nPos != -1 )
- {
- sTmp = sTmp.copy( nPos );
- OString sId = sTmp.getToken(1, '"');
- return sId;
- }
- return OString();
+ if ( nPos<0 )
+ return OString();
+
+ return sTmp.getToken(1, '"', nPos);
}