mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-12 22:14:58 +00:00
CppCheck: About assert side-effect and remove_if that i don't know enough..
This commit is contained in:
parent
d072eba687
commit
cd23a2ecaf
rpcs3/Emu
@ -5820,7 +5820,9 @@ void RecompilationEngine::ProcessExecutionTrace(const ExecutionTrace & execution
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO:: Syphurith: It is said that just remove_if would cause some troubles.. I don't know if that would cause Memleak. From CppCheck:
|
||||||
|
// The return value of std::remove_if() is ignored. This function returns an iterator to the end of the range containing those elements that should be kept.
|
||||||
|
// Elements past new end remain valid but with unspecified values. Use the erase method of the container to delete them.
|
||||||
std::remove_if(processed_execution_trace_i->second.begin(), processed_execution_trace_i->second.end(), [](const BlockEntry * b)->bool { return b->is_compiled; });
|
std::remove_if(processed_execution_trace_i->second.begin(), processed_execution_trace_i->second.end(), [](const BlockEntry * b)->bool { return b->is_compiled; });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ u64 vfsStreamMemory::Write(const void* src, u64 size)
|
|||||||
|
|
||||||
u64 vfsStreamMemory::Read(void* dst, u64 size)
|
u64 vfsStreamMemory::Read(void* dst, u64 size)
|
||||||
{
|
{
|
||||||
|
// TODO:: Syphurith: Should us do anything? Since Asserts aren't included in Release builds.
|
||||||
assert(Tell() < GetSize());
|
assert(Tell() < GetSize());
|
||||||
if (Tell() + size > GetSize())
|
if (Tell() + size > GetSize())
|
||||||
{
|
{
|
||||||
|
@ -148,7 +148,7 @@ void ElementaryStream::push_au(u32 size, u64 dts, u64 pts, u64 userdata, bool ra
|
|||||||
u32 addr;
|
u32 addr;
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock(m_mutex);
|
std::lock_guard<std::mutex> lock(m_mutex);
|
||||||
|
// TODO:: Syphurith: Should us convert this to a if statement? Since Asserts aren't included in Release builds.
|
||||||
assert(!is_full(size));
|
assert(!is_full(size));
|
||||||
|
|
||||||
if (put + size + 128 > memAddr + memSize)
|
if (put + size + 128 > memAddr + memSize)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user