From 2116ca54115ddf9877b1cbd7f269a554a0760749 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 2 Mar 2015 10:48:33 +0000 Subject: V804: Decreased performance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iee15e6f2a08447ccbb82b39146cd5ade68e82b1e Reviewed-on: https://gerrit.libreoffice.org/14711 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- setup_native/source/win32/customactions/sellang/sellang.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'setup_native') 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 #include +#include #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; } -- cgit