summaryrefslogtreecommitdiff
path: root/extensions/source/activex/SODispatchInterceptor.cxx
diff options
context:
space:
mode:
authorHossein <hossein@libreoffice.org>2023-09-06 22:50:25 +0200
committerHossein <hossein@libreoffice.org>2023-09-07 10:09:14 +0200
commit7a643f40b4c76bc55f17c3137aad90dbf55463ea (patch)
treeb2b0a9f0242c1a4a12f4a4c1ebf625d4a875ba9a /extensions/source/activex/SODispatchInterceptor.cxx
parent3aa3f0a1638a8d8006955b62bb647526768be3d8 (diff)
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 <mike.kaganski@collabora.com>
Diffstat (limited to 'extensions/source/activex/SODispatchInterceptor.cxx')
-rw-r--r--extensions/source/activex/SODispatchInterceptor.cxx14
1 files changed, 3 insertions, 11 deletions
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 <sal/config.h>
@@ -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;
}