mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 23:11:14 +01:00
Replace Windows CMake lambda constexpr capture workaround
While manually capturing constexpr variables used in lambda expressions does work, it's really easy to forget doing so since we don't have a Windows CMake builder and the workaround isn't necessary anywhere else. Fortunately, MSVC has a flag that fixes the constexpr capture behavior, so let's use that instead.
This commit is contained in:
parent
26ed3b318c
commit
c9edfa0eaa
@ -241,6 +241,8 @@ if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
|||||||
add_compile_options(/Zc:throwingNew)
|
add_compile_options(/Zc:throwingNew)
|
||||||
# Enforce strict volatile semantics as per ISO C++
|
# Enforce strict volatile semantics as per ISO C++
|
||||||
add_compile_options(/volatile:iso)
|
add_compile_options(/volatile:iso)
|
||||||
|
# Fix non-conformant lambda behavior (constexpr variables shouldn't need capturing)
|
||||||
|
add_compile_options(/experimental:newLambdaProcessor)
|
||||||
|
|
||||||
string(APPEND CMAKE_EXE_LINKER_FLAGS " /NXCOMPAT")
|
string(APPEND CMAKE_EXE_LINKER_FLAGS " /NXCOMPAT")
|
||||||
else()
|
else()
|
||||||
|
@ -139,9 +139,9 @@ void VerifyWidget::Verify()
|
|||||||
progress.GetRaw()->setMinimumDuration(500);
|
progress.GetRaw()->setMinimumDuration(500);
|
||||||
progress.GetRaw()->setWindowModality(Qt::WindowModal);
|
progress.GetRaw()->setWindowModality(Qt::WindowModal);
|
||||||
|
|
||||||
auto future = std::async(
|
auto future =
|
||||||
std::launch::async,
|
std::async(std::launch::async,
|
||||||
[&verifier, &progress, DIVISOR]() -> std::optional<DiscIO::VolumeVerifier::Result> {
|
[&verifier, &progress]() -> std::optional<DiscIO::VolumeVerifier::Result> {
|
||||||
progress.SetValue(0);
|
progress.SetValue(0);
|
||||||
verifier.Start();
|
verifier.Start();
|
||||||
while (verifier.GetBytesProcessed() != verifier.GetTotalBytes())
|
while (verifier.GetBytesProcessed() != verifier.GetTotalBytes())
|
||||||
|
@ -196,7 +196,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
|||||||
}
|
}
|
||||||
|
|
||||||
mmio->Register(base | FIFO_BP_LO, MMIO::DirectRead<u16>(MMIO::Utils::LowPart(&fifo.CPBreakpoint)),
|
mmio->Register(base | FIFO_BP_LO, MMIO::DirectRead<u16>(MMIO::Utils::LowPart(&fifo.CPBreakpoint)),
|
||||||
MMIO::ComplexWrite<u16>([WMASK_LO_ALIGN_32BIT](u32, u16 val) {
|
MMIO::ComplexWrite<u16>([](u32, u16 val) {
|
||||||
WriteLow(fifo.CPBreakpoint, val & WMASK_LO_ALIGN_32BIT);
|
WriteLow(fifo.CPBreakpoint, val & WMASK_LO_ALIGN_32BIT);
|
||||||
}));
|
}));
|
||||||
mmio->Register(base | FIFO_BP_HI,
|
mmio->Register(base | FIFO_BP_HI,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user