diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 07:42:02 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 06:46:07 +0000 |
commit | 3bdd176731c351638f541a37b94094124f3c9f52 (patch) | |
tree | ccae69c3871620923bea1c5a048f44ad428853c0 /compilerplugins | |
parent | 7272e8df62a12d6172b297d7a82a0265cd1bc44a (diff) |
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>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/passstuffbyref.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compilerplugins/clang/passstuffbyref.cxx b/compilerplugins/clang/passstuffbyref.cxx index 6d98dbf90341..673b72b32f8e 100644 --- a/compilerplugins/clang/passstuffbyref.cxx +++ b/compilerplugins/clang/passstuffbyref.cxx @@ -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; } |