From 9bdec0831afc45af45ea6d9350ef3372188b45cb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 1 Nov 2016 13:10:08 +0200 Subject: loplugin:oncevar in sd..svgio Change-Id: I58565460fcc3279c9771c6e1272d0af540b2c87c Reviewed-on: https://gerrit.libreoffice.org/30459 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- svgio/source/svgreader/svgtools.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'svgio') diff --git a/svgio/source/svgreader/svgtools.cxx b/svgio/source/svgreader/svgtools.cxx index 3ef273fe4e36..d78a121447be 100644 --- a/svgio/source/svgreader/svgtools.cxx +++ b/svgio/source/svgreader/svgtools.cxx @@ -1482,15 +1482,13 @@ namespace svgio if(!rMimeType.isEmpty() && nPos < nLen) { - static const char aStrImage[] = "image"; - - if(rMimeType.match(aStrImage, 0)) + if(rMimeType.startsWith("image")) { // image data OUString aData(rCandidate.copy(nPos)); static const char aStrBase64[] = "base64"; - if(aData.match(aStrBase64, 0)) + if(aData.startsWith(aStrBase64)) { // base64 encoded nPos = strlen(aStrBase64); -- cgit