Compare commits

...

5 Commits

Author SHA1 Message Date
oltolm
9267e72ef9 refactor: Fix pugixml deprecation warnings (#1677) 2025-08-30 20:39:48 +02:00
oltolm
6013ac1823 refactor: Fix trivial compiler warnings (#1675) 2025-08-30 13:01:52 +02:00
oltolm
de4bf7c2c1 refactor: use concepts instead of SFINAE (#1652) 2025-08-25 01:33:46 +02:00
Exzap
aeb3154257 debugger: Fix clipboard related crash
When copying an address from Cemu's debugger and pasting it into Cemu (anywhere) it would crash because the memory was released prematurely
2025-08-17 17:58:30 +02:00
capitalistspz
d7c510ed31 Update vcpkg dependency SDL2 to 2.32.8 (#1670) 2025-08-16 05:56:30 +02:00
22 changed files with 98 additions and 100 deletions

View File

@@ -106,7 +106,7 @@ bool gameProfile_loadIntegerOption(IniParser* iniParser, const char* optionName,
template <typename T>
bool gameProfile_loadIntegerOption(IniParser& iniParser, const char* optionName, T& option, T minVal, T maxVal)
{
static_assert(std::is_integral<T>::value);
static_assert(std::is_integral_v<T>);
auto option_value = iniParser.FindOption(optionName);
if (!option_value)
return false;
@@ -133,7 +133,7 @@ bool gameProfile_loadIntegerOption(IniParser& iniParser, const char* optionName,
template<typename T>
bool gameProfile_loadEnumOption(IniParser& iniParser, const char* optionName, T& option)
{
static_assert(std::is_enum<T>::value);
static_assert(std::is_enum_v<T>);
auto option_value = iniParser.FindOption(optionName);
if (!option_value)
return false;
@@ -366,4 +366,4 @@ void GameProfile::Reset()
// controller settings
for (auto& profile : m_controllerProfile)
profile.reset();
}
}

View File

@@ -276,7 +276,7 @@ void IMLRA_DeleteAllRanges(ppcImlGenContext_t* ppcImlGenContext)
for(auto& seg : ppcImlGenContext->segmentList2)
{
raLivenessRange* cur;
while(cur = seg->raInfo.linkedList_allSubranges)
while ((cur = seg->raInfo.linkedList_allSubranges))
IMLRA_DeleteRange(ppcImlGenContext, cur);
seg->raInfo.linkedList_allSubranges = nullptr;
seg->raInfo.linkedList_perVirtualRegister.clear();
@@ -632,4 +632,4 @@ sint32 IMLRA_CalculateAdditionalCostAfterSplit(raLivenessRange* subrange, raInst
cost = newCost - baseCost;
return cost;
}
}

View File

@@ -25,7 +25,7 @@ class IntervalTree2
// static TNodeObject* Split(TNodeObject* nodeObject, TRangeData firstRangeBegin, TRangeData firstRangeEnd, TRangeData secondRangeBegin, TRangeData secondRangeEnd)
// Cut a hole into an existing range and split it in two. Should return the newly created node object after the hole
static_assert(std::is_pointer<TNodeObject>::value == false, "TNodeObject must be a non-pointer type");
static_assert(!std::is_pointer_v<TNodeObject>, "TNodeObject must be a non-pointer type");
struct InternalRange
{

View File

@@ -80,7 +80,7 @@ private:
D3DKMT_OPENADAPTERFROMHDC OpenAdapterData;
*phAdapter = NULL;
*phAdapter = 0;
*pOutput = 0;
HMONITOR hMonitor = MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST);

View File

@@ -176,14 +176,14 @@ void cafeExportCallWrapper(PPCInterpreter_t* hCPU)
if(cemuLog_advancedPPCLoggingEnabled())
{
MPTR threadMPTR = memory_getVirtualOffsetFromPointer(coreinit::OSGetCurrentThread());
if constexpr (std::tuple_size<decltype(format_tup)>::value > 0)
if constexpr (std::tuple_size_v<decltype(format_tup)> > 0)
shouldLog = cemuLog_log(TLogType, "{}.{}{} # LR: {:#x} | Thread: {:#x}", TNames::GetLib(), TNames::GetFunc(), format_tup, hCPU->spr.LR, threadMPTR);
else
shouldLog = cemuLog_log(TLogType, "{}.{}() # LR: {:#x} | Thread: {:#x}", TNames::GetLib(), TNames::GetFunc(), hCPU->spr.LR, threadMPTR);
}
else
{
if constexpr (std::tuple_size<decltype(format_tup)>::value > 0)
if constexpr (std::tuple_size_v<decltype(format_tup)> > 0)
{
shouldLog = cemuLog_log(TLogType, "{}.{}{}", TNames::GetLib(), TNames::GetFunc(), format_tup);
}
@@ -192,7 +192,7 @@ void cafeExportCallWrapper(PPCInterpreter_t* hCPU)
}
}
if constexpr (!std::is_void<decltype(std::apply(fn, tup))>::value)
if constexpr (!std::is_void_v<decltype(std::apply(fn, tup))>)
{
// has non-void return type
decltype(auto) result = std::apply(fn, tup);
@@ -241,4 +241,4 @@ MPTR makeCallableExport()
return PPCInterpreter_makeCallableExportDepr(&cafeExportCallWrapper<fn, "CALLABLE_EXPORT">);
}
void osLib_addVirtualPointer(const char* libraryName, const char* functionName, uint32 vPtr);
void osLib_addVirtualPointer(const char* libraryName, const char* functionName, uint32 vPtr);

View File

@@ -39,9 +39,9 @@ inline void gx2WriteGather_submit_(uint32 coreIndex, uint32be* writePtr, const b
}
template <typename T, typename ...Targs>
requires std::is_floating_point_v<T>
inline
typename std::enable_if< std::is_floating_point<T>::value, void>::type
gx2WriteGather_submit_(uint32 coreIndex, uint32be* writePtr, const T& arg, Targs... args)
void gx2WriteGather_submit_(uint32 coreIndex, uint32be* writePtr, const T& arg, Targs... args)
{
static_assert(sizeof(T) == sizeof(uint32));
*writePtr = *(uint32*)&arg;
@@ -50,9 +50,9 @@ gx2WriteGather_submit_(uint32 coreIndex, uint32be* writePtr, const T& arg, Targs
}
template <typename T, typename ...Targs>
requires std::is_base_of_v<Latte::LATTEREG, T>
inline
typename std::enable_if< std::is_base_of<Latte::LATTEREG, T>::value, void>::type
gx2WriteGather_submit_(uint32 coreIndex, uint32be* writePtr, const T& arg, Targs... args)
void gx2WriteGather_submit_(uint32 coreIndex, uint32be* writePtr, const T& arg, Targs... args)
{
static_assert(sizeof(Latte::LATTEREG) == sizeof(uint32be));
*writePtr = arg.getRawValue();
@@ -61,9 +61,9 @@ gx2WriteGather_submit_(uint32 coreIndex, uint32be* writePtr, const T& arg, Targs
}
template <typename T, typename ...Targs>
requires (!std::is_base_of_v<Latte::LATTEREG, T>) && (!std::is_floating_point_v<T>)
inline
typename std::enable_if< !std::is_base_of<Latte::LATTEREG, T>::value && !std::is_floating_point<T>::value, void>::type
gx2WriteGather_submit_(uint32 coreIndex, uint32be* writePtr, const T& arg, Targs... args)
void gx2WriteGather_submit_(uint32 coreIndex, uint32be* writePtr, const T& arg, Targs... args)
{
*writePtr = arg;
writePtr++;
@@ -105,4 +105,4 @@ namespace GX2
void GX2Init_commandBufferPool(void* bufferBase, uint32 bufferSize);
void GX2Shutdown_commandBufferPool();
void GX2CommandResetToDefaultState();
}
}

View File

@@ -87,7 +87,7 @@ namespace nn
if (httpCode != 200)
return OLV_RESULT_STATUS(httpCode + 4000);
std::string request_name = doc.select_single_node("//request_name").node().child_value();
std::string request_name = doc.select_node("//request_name").node().child_value();
if (request_name.size() == 0)
{
cemuLog_log(LogType::Force, "Community download response doesn't contain <request_name>");
@@ -100,7 +100,7 @@ namespace nn
return OLV_RESULT_INVALID_XML;
}
pugi::xml_node communities = doc.select_single_node("//communities").node();
pugi::xml_node communities = doc.select_node("//communities").node();
if (!communities)
{
cemuLog_log(LogType::Force, "Community download response doesn't contain <communities>");
@@ -231,4 +231,4 @@ namespace nn
return res;
}
}
}
}

View File

@@ -1,5 +1,3 @@
#pragma once
#include "nn_olv_InitializeTypes.h"
#include "CafeSystem.h"
#include "Cafe/OS/libs/nn_act/nn_act.h"

View File

@@ -38,12 +38,12 @@ namespace nn
if (!pParam->communityId)
return OLV_RESULT_INVALID_PARAMETER;
snprintf(requestUrl, sizeof(requestUrl), "%s/v1/communities/%lu.delete", g_DiscoveryResults.apiEndpoint, pParam->communityId.value());
snprintf(requestUrl, sizeof(requestUrl), "%s/v1/communities/%u.delete", g_DiscoveryResults.apiEndpoint, pParam->communityId.value());
}
else
{
if (pParam->communityId)
snprintf(requestUrl, sizeof(requestUrl), "%s/v1/communities/%lu", g_DiscoveryResults.apiEndpoint, pParam->communityId.value());
snprintf(requestUrl, sizeof(requestUrl), "%s/v1/communities/%u", g_DiscoveryResults.apiEndpoint, pParam->communityId.value());
else
snprintf(requestUrl, sizeof(requestUrl), "%s/v1/communities", g_DiscoveryResults.apiEndpoint);
}
@@ -223,12 +223,12 @@ namespace nn
if (pOutData)
{
std::string_view app_data = doc.select_single_node("//app_data").node().child_value();
std::string_view community_id = doc.select_single_node("//community_id").node().child_value();
std::string_view name = doc.select_single_node("//name").node().child_value();
std::string_view description = doc.select_single_node("//description").node().child_value();
std::string_view pid = doc.select_single_node("//pid").node().child_value();
std::string_view icon = doc.select_single_node("//icon").node().child_value();
std::string_view app_data = doc.select_node("//app_data").node().child_value();
std::string_view community_id = doc.select_node("//community_id").node().child_value();
std::string_view name = doc.select_node("//name").node().child_value();
std::string_view description = doc.select_node("//description").node().child_value();
std::string_view pid = doc.select_node("//pid").node().child_value();
std::string_view icon = doc.select_node("//icon").node().child_value();
if (app_data.size() != 0)
{

View File

@@ -36,9 +36,9 @@ namespace nn
char requestUrl[512];
if (pParam->flags & UploadFavoriteToCommunityDataParam::FLAG_DELETION)
snprintf(requestUrl, sizeof(requestUrl), "%s/v1/communities/%lu.unfavorite", g_DiscoveryResults.apiEndpoint, pParam->communityId.value());
snprintf(requestUrl, sizeof(requestUrl), "%s/v1/communities/%u.unfavorite", g_DiscoveryResults.apiEndpoint, pParam->communityId.value());
else
snprintf(requestUrl, sizeof(requestUrl), "%s/v1/communities/%lu.favorite", g_DiscoveryResults.apiEndpoint, pParam->communityId.value());
snprintf(requestUrl, sizeof(requestUrl), "%s/v1/communities/%u.favorite", g_DiscoveryResults.apiEndpoint, pParam->communityId.value());
CurlRequestHelper req;
req.initate(ActiveSettings::GetNetworkService(), requestUrl, CurlRequestHelper::SERVER_SSL_CONTEXT::OLIVE);
@@ -88,12 +88,12 @@ namespace nn
if (pOutData)
{
std::string_view app_data = doc.select_single_node("//app_data").node().child_value();
std::string_view community_id = doc.select_single_node("//community_id").node().child_value();
std::string_view name = doc.select_single_node("//name").node().child_value();
std::string_view description = doc.select_single_node("//description").node().child_value();
std::string_view pid = doc.select_single_node("//pid").node().child_value();
std::string_view icon = doc.select_single_node("//icon").node().child_value();
std::string_view app_data = doc.select_node("//app_data").node().child_value();
std::string_view community_id = doc.select_node("//community_id").node().child_value();
std::string_view name = doc.select_node("//name").node().child_value();
std::string_view description = doc.select_node("//description").node().child_value();
std::string_view pid = doc.select_node("//pid").node().child_value();
std::string_view icon = doc.select_node("//icon").node().child_value();
if (app_data.size() != 0)
{
@@ -169,4 +169,4 @@ namespace nn
return OLV_RESULT_SUCCESS;
}
}
}
}

View File

@@ -37,7 +37,7 @@ public:
template<typename T>
T Evaluate(std::string_view expression) const
{
static_assert(std::is_arithmetic<T>::value, "type T must be an arithmetic type");
static_assert(std::is_arithmetic_v<T>, "type T must be an arithmetic type");
return (T)Evaluate(expression);
}

View File

@@ -113,9 +113,8 @@ public:
operator void*() { return m_sysMem->GetPtr(); }
// for all arrays except bool
template<class Q = T>
typename std::enable_if< count != 1 && !std::is_same<Q, bool>::value, Q >::type&
operator[](int index)
T& operator[](int index)
requires(count != 1) && (!std::is_same_v<T, bool>)
{
// return tmp data until we allocated in sys mem
if (m_sysMem.GetMPTR() == 0)
@@ -125,7 +124,7 @@ public:
return m_sysMem[index];
}
private:
private:
SysAllocator(uint32 memptr)
: m_sysMem(memptr)
{}
@@ -215,4 +214,4 @@ private:
MEMPTR<T> m_sysMem;
T m_tempData;
};
};

View File

@@ -22,7 +22,7 @@ constexpr T bswap(T i)
template <typename T>
constexpr T SwapEndian(T value)
{
if constexpr (std::is_integral<T>::value)
if constexpr (std::is_integral_v<T>)
{
#ifdef _MSC_VER
if constexpr (sizeof(T) == sizeof(uint32_t))
@@ -33,7 +33,7 @@ constexpr T SwapEndian(T value)
return (T)bswap((std::make_unsigned_t<T>)value);
}
else if constexpr (std::is_floating_point<T>::value)
else if constexpr (std::is_floating_point_v<T>)
{
if constexpr (sizeof(T) == sizeof(uint32_t))
{
@@ -46,18 +46,18 @@ constexpr T SwapEndian(T value)
return *(T*)&tmp;
}
}
else if constexpr (std::is_enum<T>::value)
else if constexpr (std::is_enum_v<T>)
{
return (T)SwapEndian((std::underlying_type_t<T>)value);
}
else if constexpr (std::is_base_of<Latte::LATTEREG, T>::value)
else if constexpr (std::is_base_of_v<Latte::LATTEREG, T>)
{
const auto tmp = bswap<uint32_t>(*(uint32_t*)&value);
return *(T*)&tmp;
}
else
{
static_assert(std::is_integral<T>::value, "unsupported betype specialization!");
static_assert(std::is_integral_v<T>, "unsupported betype specialization!");
}
return value;

View File

@@ -10,63 +10,65 @@ struct EnableBitMaskOperators
};
template<typename TEnum>
typename std::enable_if<EnableBitMaskOperators<TEnum>::enable, TEnum>::type
operator &(TEnum lhs, TEnum rhs)
requires EnableBitMaskOperators<TEnum>::enable
TEnum operator &(TEnum lhs, TEnum rhs)
{
return static_cast<TEnum> (static_cast<typename std::underlying_type<TEnum>::type>(lhs) & static_cast<typename std::underlying_type<TEnum>::type>(rhs));
}
template<typename TEnum>
typename std::enable_if<EnableBitMaskOperators<TEnum>::enable, TEnum>::type
operator |(TEnum lhs, TEnum rhs)
requires EnableBitMaskOperators<TEnum>::enable
TEnum operator |(TEnum lhs, TEnum rhs)
{
return static_cast<TEnum> (static_cast<typename std::underlying_type<TEnum>::type>(lhs) | static_cast<typename std::underlying_type<TEnum>::type>(rhs));
}
template<typename TEnum>
typename std::enable_if<EnableBitMaskOperators<TEnum>::enable, TEnum>::type
operator ^(TEnum lhs, TEnum rhs)
requires EnableBitMaskOperators<TEnum>::enable
TEnum operator ^(TEnum lhs, TEnum rhs)
{
return static_cast<TEnum> (static_cast<typename std::underlying_type<TEnum>::type>(lhs) ^ static_cast<typename std::underlying_type<TEnum>::type>(rhs));
}
template<typename TEnum>
typename std::enable_if<EnableBitMaskOperators<TEnum>::enable, TEnum>::type
operator ~(TEnum rhs)
requires EnableBitMaskOperators<TEnum>::enable
TEnum operator ~(TEnum rhs)
{
return static_cast<TEnum> (~static_cast<typename std::underlying_type<TEnum>::type>(rhs));
}
template<typename TEnum>
typename std::enable_if<EnableBitMaskOperators<TEnum>::enable, TEnum>::type&
operator &=(TEnum& lhs, TEnum rhs)
requires EnableBitMaskOperators<TEnum>::enable
TEnum& operator &=(TEnum& lhs, TEnum rhs)
{
lhs = static_cast<TEnum> (static_cast<typename std::underlying_type<TEnum>::type>(lhs) & static_cast<typename std::underlying_type<TEnum>::type>(rhs));
return lhs;
}
template<typename TEnum>
typename std::enable_if<EnableBitMaskOperators<TEnum>::enable, TEnum>::type&
operator |=(TEnum& lhs, TEnum rhs)
requires EnableBitMaskOperators<TEnum>::enable
TEnum& operator |=(TEnum& lhs, TEnum rhs)
{
lhs = static_cast<TEnum> (static_cast<typename std::underlying_type<TEnum>::type>(lhs) | static_cast<typename std::underlying_type<TEnum>::type>(rhs));
return lhs;
}
template<typename TEnum>
typename std::enable_if<EnableBitMaskOperators<TEnum>::enable, TEnum>::type&
operator ^=(TEnum& lhs, TEnum rhs)
requires EnableBitMaskOperators<TEnum>::enable
TEnum& operator ^=(TEnum& lhs, TEnum rhs)
{
lhs = static_cast<TEnum> (static_cast<typename std::underlying_type<TEnum>::type>(lhs) ^ static_cast<typename std::underlying_type<TEnum>::type>(rhs));
return lhs;
}
template<typename TEnum, typename = std::enable_if_t<EnableBitMaskOperators<TEnum>::enable>>
template<typename TEnum>
requires EnableBitMaskOperators<TEnum>::enable
constexpr bool operator==(TEnum lhs, std::underlying_type_t<TEnum> rhs)
{
return static_cast<std::underlying_type_t<TEnum>>(lhs) == rhs;
}
template<typename TEnum, typename = std::enable_if_t<EnableBitMaskOperators<TEnum>::enable>>
template<typename TEnum>
requires EnableBitMaskOperators<TEnum>::enable
constexpr bool operator!=(TEnum lhs, std::underlying_type_t<TEnum> rhs)
{
return static_cast<std::underlying_type_t<TEnum>>(lhs) != rhs;
@@ -82,43 +84,43 @@ struct EnableEnumIterators
};
template<typename TEnum>
typename std::enable_if<EnableEnumIterators<TEnum>::enable, TEnum>::type&
operator++(TEnum& lhs)
requires EnableEnumIterators<TEnum>::enable
TEnum& operator++(TEnum& lhs)
{
lhs = static_cast<TEnum>(static_cast<typename std::underlying_type<TEnum>::type>(lhs) + 1);
return lhs;
}
template<typename TEnum>
typename std::enable_if<EnableEnumIterators<TEnum>::enable, TEnum>::type
operator*(TEnum rhs)
requires EnableEnumIterators<TEnum>::enable
TEnum operator*(TEnum rhs)
{
return rhs;
}
template<typename TEnum>
typename std::enable_if<EnableEnumIterators<TEnum>::enable, TEnum>::type
begin(TEnum value)
requires EnableEnumIterators<TEnum>::enable
TEnum begin(TEnum value)
{
return EnableEnumIterators<TEnum>::begin;
}
template<typename TEnum>
typename std::enable_if<EnableEnumIterators<TEnum>::enable, TEnum>::type
rbegin(TEnum value)
requires EnableEnumIterators<TEnum>::enable
TEnum rbegin(TEnum value)
{
return EnableEnumIterators<TEnum>::rbegin;
}
template<typename TEnum>
typename std::enable_if<EnableEnumIterators<TEnum>::enable, TEnum>::type
end(TEnum r) {
requires EnableEnumIterators<TEnum>::enable
TEnum end(TEnum r) {
return EnableEnumIterators<TEnum>::end;
}
template<typename TEnum>
typename std::enable_if<EnableEnumIterators<TEnum>::enable, TEnum>::type
rend(TEnum r) {
requires EnableEnumIterators<TEnum>::enable
TEnum rend(TEnum r) {
return EnableEnumIterators<TEnum>::rend;
}
@@ -129,4 +131,4 @@ rend(TEnum r) {
static const x end = static_cast<x>(static_cast<typename std::underlying_type<x>::type>(last_value) + 1);\
static const x rend = static_cast<x>(static_cast<typename std::underlying_type<x>::type>(first_value) - 1);\
};
// todo: rend type must be signed?
// todo: rend type must be signed?

View File

@@ -653,7 +653,8 @@ struct fmt::formatter<betype<T>> : fmt::formatter<T>
namespace stdx
{
// std::to_underlying
template <typename EnumT, typename = std::enable_if_t < std::is_enum<EnumT>{} >>
template <typename EnumT>
requires (std::is_enum_v<EnumT>)
constexpr std::underlying_type_t<EnumT> to_underlying(EnumT e) noexcept {
return static_cast<std::underlying_type_t<EnumT>>(e);
};
@@ -689,7 +690,7 @@ namespace stdx
template<typename T>
class atomic_ref
{
static_assert(std::is_trivially_copyable<T>::value, "atomic_ref requires trivially copyable types");
static_assert(std::is_trivially_copyable_v<T>, "atomic_ref requires trivially copyable types");
public:
using value_type = T;

View File

@@ -96,15 +96,15 @@ public:
m_value = v;
}
template <typename = typename std::enable_if<std::is_same_v<TType, std::string>>>
void SetValue(std::string_view v)
requires std::is_same_v<TType, std::string>
{
std::lock_guard lock(m_mutex);
m_value = v;
}
template <typename = typename std::enable_if<std::is_same_v<TType, std::wstring>>>
void SetValue(std::wstring_view v)
requires std::is_same_v<TType, std::string>
{
std::lock_guard lock(m_mutex);
m_value = v;
@@ -171,22 +171,22 @@ public:
}
// init from enum with iterators
template<typename TEnum = typename std::enable_if<std::is_enum<TType>::value && EnableEnumIterators<TType>::enable, TType>>
constexpr ConfigValueBounds()
: base_type(), m_min_value(begin(TEnum{})), m_max_value(rbegin(TEnum{}))
requires std::is_enum_v<TType> && EnableEnumIterators<TType>::enable
: base_type(), m_min_value(begin(TType{})), m_max_value(rbegin(TType{}))
{
assert(m_min_value <= this->GetInitValue() && this->GetInitValue() <= m_max_value);
}
template<typename TEnum = typename std::enable_if<std::is_enum<TType>::value && EnableEnumIterators<TType>::enable, TType>>
constexpr ConfigValueBounds(const TType& init_value)
requires std::is_enum_v<TType> && EnableEnumIterators<TType>::enable
: base_type(std::forward<TType>(init_value)), m_min_value(begin(init_value)), m_max_value(rbegin(init_value))
{
assert(m_min_value <= init_value && init_value <= m_max_value);
}
template<typename TEnum = typename std::enable_if<std::is_enum<TType>::value && EnableEnumIterators<TType>::enable, TType>>
constexpr ConfigValueBounds(TType&& init_value)
requires std::is_enum_v<TType> && EnableEnumIterators<TType>::enable
: base_type(std::forward<TType>(init_value)), m_min_value(begin(init_value)), m_max_value(rbegin(init_value))
{
assert(m_min_value <= init_value && init_value <= m_max_value);

View File

@@ -221,7 +221,7 @@ public:
{
auto* element = m_document->NewElement(name);
if constexpr (std::is_enum<T>::value)
if constexpr (std::is_enum_v<T>)
element->SetText(fmt::format("{}", static_cast<typename std::underlying_type<T>::type>(value)).c_str());
else
element->SetText(fmt::format("{}", value).c_str());

View File

@@ -693,7 +693,8 @@ void DisasmCtrl::OnMouseDClick(const wxPoint& position, uint32 line)
}
}
void DisasmCtrl::CopyToClipboard(std::string text) {
void DisasmCtrl::CopyToClipboard(std::string text)
{
#if BOOST_OS_WINDOWS
if (OpenClipboard(nullptr))
{
@@ -703,9 +704,7 @@ void DisasmCtrl::CopyToClipboard(std::string text) {
{
memcpy(GlobalLock(hGlobal), text.c_str(), text.size() + 1);
GlobalUnlock(hGlobal);
SetClipboardData(CF_TEXT, hGlobal);
GlobalFree(hGlobal);
}
CloseClipboard();
}

View File

@@ -11,7 +11,7 @@ public:
template<typename T>
T* GetControl() const
{
static_assert(std::is_base_of<wxControl, T>::value, "T must inherit from wxControl");
static_assert(std::is_base_of_v<wxControl, T>, "T must inherit from wxControl");
return dynamic_cast<T*>(m_control);
}
@@ -30,7 +30,7 @@ public:
template<typename T = wxControl>
T* GetControl(int index) const
{
static_assert(std::is_base_of<wxControl, T>::value, "T must inherit from wxControl");
static_assert(std::is_base_of_v<wxControl, T>, "T must inherit from wxControl");
if (index < 0 || index >= m_controls.size())
return nullptr;
@@ -41,4 +41,4 @@ public:
private:
std::vector<wxControl*> m_controls;
};
};

View File

@@ -283,7 +283,7 @@ private:
{
if (itr.chunkIndex != dbgRange.chunkIndex)
continue;
if (itr.offset < (dbgRange.offset + dbgRange.size) && (itr.offset + itr.size) >(dbgRange.offset))
if (itr.offset < (dbgRange.offset + dbgRange.size) && (itr.offset + itr.size) > dbgRange.offset)
cemu_assert_error();
}

View File

@@ -10,9 +10,8 @@ public:
bool Push(const T& v);
template<class Q = T>
typename std::enable_if< !std::is_array<T>::value, Q >::type
Pop()
T Pop()
requires (!std::is_array_v<T>)
{
std::unique_lock<std::mutex> lock(m_mutex);
if (m_readPointer == m_writePointer)

View File

@@ -71,7 +71,7 @@
},
{
"name": "sdl2",
"version": "2.30.3"
"version": "2.32.8"
},
{
"name": "wxwidgets",