aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-01-05 16:10:00 +1100
committerNeil <nyamatongwe@gmail.com>2015-01-05 16:10:00 +1100
commitb0692368ff9aec9430da8b6d11c70887c7215007 (patch)
tree14090fd8104c009eea4c001c74ee49bf8a4097e9
parent9a96f7732129e9b2bf452e2d39aa1188010f2d0e (diff)
downloadscintilla-mirror-b0692368ff9aec9430da8b6d11c70887c7215007.tar.gz
Allocate is only called when no handle in constructor so assert that to avoid
warning from cppcheck.
-rw-r--r--win32/ScintillaWin.cxx1
1 files changed, 1 insertions, 0 deletions
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);