mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
chore: 修复 Debug 配置编译警告
This commit is contained in:
parent
1e7c571e6e
commit
664e0f4c8a
3 changed files with 10 additions and 3 deletions
|
|
@ -272,8 +272,8 @@ void CursorDrawer::Draw(ID3D11Texture2D* backBuffer, POINT drawOffset) noexcept
|
|||
UINT destLeft = UINT(std::max(0l, viewportRect.left - cursorRect.left));
|
||||
UINT destTop = UINT(std::max(0l, viewportRect.top - cursorRect.top));
|
||||
|
||||
assert(destLeft + srcBox.right - srcBox.left <= cursorSize.cx);
|
||||
assert(destTop + srcBox.bottom - srcBox.top <= cursorSize.cy);
|
||||
assert(LONG(destLeft + srcBox.right - srcBox.left) <= cursorSize.cx);
|
||||
assert(LONG(destTop + srcBox.bottom - srcBox.top) <= cursorSize.cy);
|
||||
|
||||
d3dDC->CopySubresourceRegion(_tempCursorTexture.get(),
|
||||
0, destLeft, destTop, 0, backBuffer, 0, &srcBox);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
#pragma once
|
||||
#if defined(_DEBUG) && defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wsign-compare"
|
||||
#endif
|
||||
#include <spdlog/spdlog.h>
|
||||
#if defined(_DEBUG) && defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#include <fmt/printf.h>
|
||||
|
||||
// std::source_location 中的函数名包含整个签名过于冗长,我们只需记录函数名,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ protected:
|
|||
static LRESULT CALLBACK _WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||
if (msg == WM_NCCREATE) {
|
||||
WindowBaseT* that = (WindowBaseT*)(((CREATESTRUCT*)lParam)->lpCreateParams);
|
||||
//assert(that && !that->_hWnd);
|
||||
assert(that && !that->_hWnd);
|
||||
that->_hWnd = hWnd;
|
||||
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)that);
|
||||
} else if (T* that = (T*)GetWindowLongPtr(hWnd, GWLP_USERDATA)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue