From 7a643f40b4c76bc55f17c3137aad90dbf55463ea Mon Sep 17 00:00:00 2001 From: Hossein Date: Wed, 6 Sep 2023 22:50:25 +0200 Subject: Simplify condition in a loop over a single element The loop was over an array which has only one element, so the condition should also work directly with its only element. Change-Id: I5b87cf03d90e9da67ac3ff72b593be0ff5fa322c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129677 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- extensions/source/activex/SODispatchInterceptor.cxx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'extensions/source/activex/SODispatchInterceptor.cxx') diff --git a/extensions/source/activex/SODispatchInterceptor.cxx b/extensions/source/activex/SODispatchInterceptor.cxx index af3d69e02ea9..97ea07568fde 100644 --- a/extensions/source/activex/SODispatchInterceptor.cxx +++ b/extensions/source/activex/SODispatchInterceptor.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -// SODispatchInterceptor.cpp : Implementation of CHelpApp and DLL registration. +// SODispatchInterceptor.cxx : Implementation of CHelpApp and DLL registration. #include @@ -33,16 +33,8 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP SODispatchInterceptor::InterfaceSupportsErrorInfo(REFIID riid) { - static const IID* arr[] = - { - &IID_ISODispatchInterceptor, - }; - - for (auto const &i : arr) - { - if (InlineIsEqualGUID(*i,riid)) - return S_OK; - } + if (InlineIsEqualGUID(IID_ISODispatchInterceptor, riid)) + return S_OK; return S_FALSE; } -- cgit