diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-02 10:48:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-02 16:19:47 +0000 |
commit | 2116ca54115ddf9877b1cbd7f269a554a0760749 (patch) | |
tree | 8c9bda39d37e0bd885d1f705c5cae4d0744b404b /setup_native | |
parent | e53da56ab2afbd28235137776a2b11f5b07fe828 (diff) |
V804: Decreased performance
Change-Id: Iee15e6f2a08447ccbb82b39146cd5ade68e82b1e
Reviewed-on: https://gerrit.libreoffice.org/14711
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'setup_native')
-rw-r--r-- | setup_native/source/win32/customactions/sellang/sellang.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx b/setup_native/source/win32/customactions/sellang/sellang.cxx index e9b644af93ae..9c6ab5326f73 100644 --- a/setup_native/source/win32/customactions/sellang/sellang.cxx +++ b/setup_native/source/win32/customactions/sellang/sellang.cxx @@ -33,6 +33,7 @@ #include <sal/macros.h> #include <systools/win32/uwinapi.h> +#include <algorithm> #include "spellchecker_selection.hxx" @@ -184,7 +185,7 @@ static BOOL present_in_ui_langs(const char *lang) { for (int i = 0; i < num_ui_langs; i++) - if (memcmp (ui_langs[i], lang, ( strlen(ui_langs[i]) >= strlen(lang) ) ? strlen(lang) : strlen(ui_langs[i]) ) == 0) + if (memcmp (ui_langs[i], lang, std::min(strlen(ui_langs[i]), strlen(lang))) == 0) return TRUE; return FALSE; } |