summaryrefslogtreecommitdiff
path: root/odk
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 /odk
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 'odk')
-rw-r--r--odk/examples/OLE/activex/SOComWindowPeer.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/odk/examples/OLE/activex/SOComWindowPeer.cpp b/odk/examples/OLE/activex/SOComWindowPeer.cpp
index 7439593dd138..50c1d7e8b341 100644
--- a/odk/examples/OLE/activex/SOComWindowPeer.cpp
+++ b/odk/examples/OLE/activex/SOComWindowPeer.cpp
@@ -33,7 +33,7 @@
*
*************************************************************************/
-// SOComWindowPeer.cpp : Implementation of CHelpApp and DLL registration.
+// SOComWindowPeer.cxx : Implementation of CHelpApp and DLL registration.
#include "stdafx2.h"
#include "so_activex.h"
@@ -42,15 +42,8 @@
STDMETHODIMP SOComWindowPeer::InterfaceSupportsErrorInfo(REFIID riid)
{
- static const IID* arr[] = {
- &IID_ISOComWindowPeer,
- };
-
- for (int i = 0; i < SAL_N_ELEMENTS(arr); i++)
- {
- if (InlineIsEqualGUID(*arr[i], riid))
- return S_OK;
- }
+ if (InlineIsEqualGUID(IID_ISOComWindowPeer, riid))
+ return S_OK;
return S_FALSE;
}