[RAPPS] Do not implicitly cast pointer to BOOL
authorJérôme Gardou <jerome.gardou@reactos.org>
Mon, 9 Nov 2020 15:05:12 +0000 (16:05 +0100)
committerJérôme Gardou <zefklop@users.noreply.github.com>
Mon, 16 Nov 2020 15:58:10 +0000 (16:58 +0100)
base/applications/rapps/include/rosui.h

index 0aaf303..4402b26 100644 (file)
@@ -96,9 +96,13 @@ public:
 
     BOOL RemoveAt(INT i)
     {
-        T* ptr = (T*) DPA_GetPtr(m_hDpa, i);
-        OnRemoveItem(ptr);
-        return DPA_DeletePtr(m_hDpa, i);
+        PVOID ptr = DPA_DeletePtr(m_hDpa, i);
+        if (ptr != NULL)
+        {
+            OnRemoveItem(reinterpret_cast<T*>(ptr));
+            return TRUE;
+        }
+        return FALSE;
     }
 
     BOOL Clear()