From 5b39dc76f1bc82f941d5c800ab9f34407a06b53a Mon Sep 17 00:00:00 2001 From: Igor Pavlov <87184205+ip7z@users.noreply.github.com> Date: Wed, 21 Jun 2023 00:00:00 +0000 Subject: 23.01 --- CPP/Windows/MemoryGlobal.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'CPP/Windows/MemoryGlobal.h') diff --git a/CPP/Windows/MemoryGlobal.h b/CPP/Windows/MemoryGlobal.h index c217510..6852591 100644 --- a/CPP/Windows/MemoryGlobal.h +++ b/CPP/Windows/MemoryGlobal.h @@ -1,7 +1,7 @@ // Windows/MemoryGlobal.h -#ifndef __WINDOWS_MEMORY_GLOBAL_H -#define __WINDOWS_MEMORY_GLOBAL_H +#ifndef ZIP7_INC_WINDOWS_MEMORY_GLOBAL_H +#define ZIP7_INC_WINDOWS_MEMORY_GLOBAL_H #include "../Common/MyWindows.h" @@ -12,7 +12,7 @@ class CGlobal { HGLOBAL _global; public: - CGlobal(): _global(NULL){}; + CGlobal(): _global(NULL) {} ~CGlobal() { Free(); } operator HGLOBAL() const { return _global; } void Attach(HGLOBAL hGlobal) @@ -22,7 +22,7 @@ public: } HGLOBAL Detach() { - HGLOBAL h = _global; + const HGLOBAL h = _global; _global = NULL; return h; } @@ -42,10 +42,10 @@ public: CGlobalLock(HGLOBAL hGlobal): _global(hGlobal) { _ptr = GlobalLock(hGlobal); - }; + } ~CGlobalLock() { - if (_ptr != NULL) + if (_ptr) GlobalUnlock(_global); } }; -- cgit v1.2.3-55-g6feb