aboutsummaryrefslogtreecommitdiff
path: root/src/win/native/window_manager.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-04-02 20:51:19 +0800
committercrupest <crupest@outlook.com>2020-04-02 20:51:19 +0800
commite38ea3de29ede0e45aab8e595da5e8e3782a396d (patch)
tree1e0fae414abea5b5cf1fd4fb4194f8c6a9795d7e /src/win/native/window_manager.cpp
parent7dd9494e957af8280f7221395333f886c500edf5 (diff)
downloadcru-e38ea3de29ede0e45aab8e595da5e8e3782a396d.tar.gz
cru-e38ea3de29ede0e45aab8e595da5e8e3782a396d.tar.bz2
cru-e38ea3de29ede0e45aab8e595da5e8e3782a396d.zip
...
Diffstat (limited to 'src/win/native/window_manager.cpp')
-rw-r--r--src/win/native/window_manager.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/win/native/window_manager.cpp b/src/win/native/window_manager.cpp
index 0bf7656a..e1b14f4b 100644
--- a/src/win/native/window_manager.cpp
+++ b/src/win/native/window_manager.cpp
@@ -4,8 +4,6 @@
#include "cru/win/native/window.hpp"
#include "cru/win/native/window_class.hpp"
-#include <cassert>
-
namespace cru::platform::native::win {
LRESULT __stdcall GeneralWndProc(HWND hWnd, UINT Msg, WPARAM wParam,
LPARAM lParam) {
@@ -31,13 +29,13 @@ WindowManager::~WindowManager() {
}
void WindowManager::RegisterWindow(HWND hwnd, WinNativeWindow* window) {
- assert(window_map_.count(hwnd) == 0); // The hwnd is already in the map.
+ Expects(window_map_.count(hwnd) == 0); // The hwnd is already in the map.
window_map_.emplace(hwnd, window);
}
void WindowManager::UnregisterWindow(HWND hwnd) {
const auto find_result = window_map_.find(hwnd);
- assert(find_result != window_map_.end()); // The hwnd is not in the map.
+ Expects(find_result != window_map_.end()); // The hwnd is not in the map.
window_map_.erase(find_result);
if (window_map_.empty()) application_->RequestQuit(0);
}