cppcheck:stlIfStrFind

"Inefficient usage of string::find() in condition; string::compare() would be faster."

Change-Id: I90403b1d05eff6499c10be33068e5fd4fed30b62
Reviewed-on: https://gerrit.libreoffice.org/19966
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin
2015-11-15 07:42:02 +02:00
parent 7272e8df62
commit 3bdd176731
3 changed files with 4 additions and 4 deletions

View File

@@ -103,7 +103,7 @@ bool PassStuffByRef::isFat(QualType type, std::string * name) {
}
*name = type.getUnqualifiedType().getCanonicalType().getAsString();
if (*name == "class rtl::OUString" || *name == "class rtl::OString"
|| name->find("class com::sun::star::uno::Sequence") == 0)
|| name->compare("class com::sun::star::uno::Sequence") == 0)
{
return true;
}