aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-04-28 10:20:26 +1000
committerNeil <nyamatongwe@gmail.com>2019-04-28 10:20:26 +1000
commit91cbdae330333600a50121228a52e24fd30e2fec (patch)
tree37bd201cf5f105e6da72dd57fab9eac859ae05f6
parent3fbb0e2d513e923f481879c1ce96aacd33f2b8c6 (diff)
downloadscintilla-mirror-91cbdae330333600a50121228a52e24fd30e2fec.tar.gz
Fix analysis warnings for GlobalMemory class.
-rw-r--r--win32/ScintillaWin.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index d19287d21..a27d7b8e2 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -2200,7 +2200,7 @@ public:
GlobalMemory &operator=(const GlobalMemory &) = delete;
GlobalMemory &operator=(GlobalMemory &&) = delete;
~GlobalMemory() {
- PLATFORM_ASSERT(!ptr);
+ assert(!ptr);
assert(!hand);
}
void Allocate(size_t bytes) noexcept {
@@ -2210,15 +2210,15 @@ public:
ptr = ::GlobalLock(hand);
}
}
- HGLOBAL Unlock() {
- PLATFORM_ASSERT(ptr);
+ HGLOBAL Unlock() noexcept {
+ assert(ptr);
HGLOBAL handCopy = hand;
::GlobalUnlock(hand);
ptr = nullptr;
- hand = 0;
+ hand = {};
return handCopy;
}
- void SetClip(UINT uFormat) {
+ void SetClip(UINT uFormat) noexcept {
::SetClipboardData(uFormat, Unlock());
}
operator bool() const noexcept {