From b0692368ff9aec9430da8b6d11c70887c7215007 Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 5 Jan 2015 16:10:00 +1100 Subject: Allocate is only called when no handle in constructor so assert that to avoid warning from cppcheck. --- win32/ScintillaWin.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index ec72a405a..161b4831e 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1999,6 +1999,7 @@ public: PLATFORM_ASSERT(!ptr); } void Allocate(size_t bytes) { + assert(!hand); hand = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, bytes); if (hand) { ptr = ::GlobalLock(hand); -- cgit v1.2.3