[CPP] Fix MTC build on the latest msvc (#21926)

This commit is contained in:
Andrey Nekrasov
2022-11-10 19:17:58 +03:00
committed by GitHub
parent ad8b959493
commit e241700414
2 changed files with 2 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ namespace
ClipCursor(nullptr);
toolState->commonState->overlayBoxText.Read([](const OverlayBoxText& text) {
SetClipBoardToText(text.buffer);
SetClipBoardToText(text.buffer.data());
});
if (const bool shiftPress = GetKeyState(VK_SHIFT) & 0x8000; shiftPress && toolState->perScreen[window].currentBounds)

View File

@@ -93,7 +93,7 @@ LRESULT CALLBACK MeasureToolWndProc(HWND window, UINT message, WPARAM wparam, LP
if (auto state = GetWindowParam<Serialized<MeasureToolState>*>(window))
{
state->Read([](const MeasureToolState& s) { s.commonState->overlayBoxText.Read([](const OverlayBoxText& text) {
SetClipBoardToText(text.buffer);
SetClipBoardToText(text.buffer.data());
}); });
}
PostMessageW(window, WM_CLOSE, {}, {});