From 1ad1f71d2fb2edf5dc788196e9220258007b87c4 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Fri, 16 Aug 2019 20:46:11 -0700 Subject: [PATCH 1/2] Make code base compatible with Visual Studio 2019. - Allow building with the MSVC 14.2 toolset. - Removed explicit reference to deprecated typedef std::map::_Pairib. --- PropertySheets/Platform.props | 3 ++- Source/Project64/UserInterface/Debugger/Breakpoints.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PropertySheets/Platform.props b/PropertySheets/Platform.props index 3195fec8b..30f3c74a1 100644 --- a/PropertySheets/Platform.props +++ b/PropertySheets/Platform.props @@ -2,7 +2,8 @@ - $(DefaultPlatformToolset)_xp + $(DefaultPlatformToolset)_xp + $(DefaultPlatformToolset) diff --git a/Source/Project64/UserInterface/Debugger/Breakpoints.cpp b/Source/Project64/UserInterface/Debugger/Breakpoints.cpp index 85e76fa1b..165f74426 100644 --- a/Source/Project64/UserInterface/Debugger/Breakpoints.cpp +++ b/Source/Project64/UserInterface/Debugger/Breakpoints.cpp @@ -64,7 +64,7 @@ bool CBreakpoints::WBPAdd(uint32_t address) bool CBreakpoints::AddExecution(uint32_t address, bool bTemporary) { PreUpdateBP(); - breakpoints_t::_Pairib res = m_Execution.insert(breakpoint_t::value_type(address, bTemporary)); + auto res = m_Execution.insert(breakpoint_t::value_type(address, bTemporary)); if (!res.second && !bTemporary) { res.first->second = true; From 05c2b59c3a5f130cf5eccc37a18cdd0a2cb4c105 Mon Sep 17 00:00:00 2001 From: "Julio C. Rocha" Date: Sat, 17 Aug 2019 00:59:45 -0700 Subject: [PATCH 2/2] Use _Pairib in VC versions below 14.2. --- Source/Project64/UserInterface/Debugger/Breakpoints.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Project64/UserInterface/Debugger/Breakpoints.cpp b/Source/Project64/UserInterface/Debugger/Breakpoints.cpp index 165f74426..86c367b19 100644 --- a/Source/Project64/UserInterface/Debugger/Breakpoints.cpp +++ b/Source/Project64/UserInterface/Debugger/Breakpoints.cpp @@ -64,7 +64,12 @@ bool CBreakpoints::WBPAdd(uint32_t address) bool CBreakpoints::AddExecution(uint32_t address, bool bTemporary) { PreUpdateBP(); +#if _MSC_VER >= 1920 // Visual Studio 2019 deprecates _Pairib auto res = m_Execution.insert(breakpoint_t::value_type(address, bTemporary)); +#else + breakpoints_t::_Pairib res = m_Execution.insert(breakpoint_t::value_type(address, bTemporary)); +#endif // _MSC_VER + if (!res.second && !bTemporary) { res.first->second = true;