summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2016-10-23 21:32:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-24 06:11:08 +0000
commit5c1bb338ef0d781648d5b33ffc9d64c2be6d9926 (patch)
treeb672aab1ed3e8d2d5dedd639f4c08be92822889c
parent02e6c1c95993740e0dbea724b3014348c4b6559d (diff)
cppcheck:stlIfStrFind
Change-Id: Ic3c1b37b0c2cf9995e0bd1017cdbaed427fb296c Reviewed-on: https://gerrit.libreoffice.org/30185 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--desktop/source/lib/init.cxx2
-rw-r--r--libreofficekit/source/gtk/lokdocview.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index f3592c8c66ac..8ce8443a50fd 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -356,7 +356,7 @@ struct RectangleAndPart
static RectangleAndPart Create(const std::string& rPayload)
{
RectangleAndPart aRet;
- if (rPayload.find("EMPTY") == 0) // payload starts with "EMPTY"
+ if (rPayload.compare("EMPTY") == 0) // payload starts with "EMPTY"
{
if (comphelper::LibreOfficeKit::isPartInInvalidation())
aRet.m_nPart = std::stol(rPayload.substr(6));
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index a08d93e8e3fa..fd67264f866e 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1136,7 +1136,7 @@ callback (gpointer pData)
{
case LOK_CALLBACK_INVALIDATE_TILES:
{
- if (pCallback->m_aPayload.find("EMPTY") != 0) // payload doesn't start with "EMPTY"
+ if (pCallback->m_aPayload.compare("EMPTY") != 0) // payload doesn't start with "EMPTY"
{
GdkRectangle aRectangle = payloadToRectangle(pDocView, pCallback->m_aPayload.c_str());
setTilesInvalid(pDocView, aRectangle);