[Libreoffice-commits] core.git: l10ntools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Mar 5 21:29:32 UTC 2019
l10ntools/source/xrmmerge.cxx | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
New commits:
commit 730df730a9425dbf4ed778dce7a95c1c0be274f6
Author: Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sun Feb 17 23:32:22 2019 +0100
Commit: Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Tue Mar 5 22:29:03 2019 +0100
Avoid unneeded OUString copy
Change-Id: I43d66f1bf4fc4a17f7dbea62e3fb13675dbbfb8a
Reviewed-on: https://gerrit.libreoffice.org/68119
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>
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);
}
More information about the Libreoffice-commits
mailing list