ams-libs: AMS_ASSERT no longer invokes expression
This commit is contained in:
@@ -23,7 +23,8 @@ namespace ams::os::impl {
|
||||
svc::MemoryInfo memory_info;
|
||||
svc::PageInfo page_info;
|
||||
const auto result = svc::QueryMemory(std::addressof(memory_info), std::addressof(page_info), address);
|
||||
AMS_ASSERT(R_SUCCEEDED(result));
|
||||
R_ASSERT(result);
|
||||
AMS_UNUSED(result);
|
||||
|
||||
return memory_info.state == svc::MemoryState_Free && address + size <= memory_info.addr + memory_info.size;
|
||||
}
|
||||
|
||||
@@ -109,6 +109,7 @@ namespace ams::os::impl {
|
||||
const auto count = mq->count;
|
||||
const auto offset = mq->offset;
|
||||
AMS_ASSERT(count > 0);
|
||||
AMS_UNUSED(count);
|
||||
|
||||
return mq->buffer[offset];
|
||||
}
|
||||
|
||||
@@ -38,8 +38,9 @@ namespace ams::os::impl {
|
||||
const s64 frac = tick_val % tick_freq;
|
||||
const TimeSpan ts = TimeSpan::FromSeconds(seconds) + TimeSpan::FromNanoSeconds(frac * NanoSecondsPerSecond / tick_freq);
|
||||
|
||||
constexpr TimeSpan ZeroTS = TimeSpan::FromNanoSeconds(0);
|
||||
constexpr TimeSpan ZeroTS = TimeSpan::FromNanoSeconds(0);
|
||||
AMS_ASSERT(!((tick_val > 0 && ts < ZeroTS) || (tick_val < 0 && ts > ZeroTS)));
|
||||
AMS_UNUSED(ZeroTS);
|
||||
|
||||
return ts;
|
||||
}
|
||||
|
||||
@@ -49,8 +49,11 @@ namespace ams::os::impl {
|
||||
|
||||
WaitableHolderBase *WaitAnyImpl(bool infinite, TimeSpan timeout) {
|
||||
WaitableHolderBase *holder = nullptr;
|
||||
|
||||
const Result wait_result = this->WaitAnyImpl(std::addressof(holder), infinite, timeout, false, svc::InvalidHandle);
|
||||
AMS_ASSERT(R_SUCCEEDED(wait_result));
|
||||
R_ASSERT(wait_result);
|
||||
AMS_UNUSED(wait_result);
|
||||
|
||||
return holder;
|
||||
}
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user