mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-03-11 07:56:15 +01:00
The function event_strcmp_events was previously returning int values (-1, 0, 1) to indicate ordering. While this may resemble strcmp-like semantics, it is invalid when used as a comparator with std::sort. According to the C++ standard, the comparator used in standard algorithms must be a function object returning a value contextually convertible to bool, where comp(a, b) returns true if and only if a is considered less than b. Returning -1, 0, or 1 violates these rules. In particular, std::sort() only expects the comparator to return a boolean value, and it uses that value to infer ordering. Returning an int may lead to incorrect sorting behavior and undefined behavior, including segmentation faults. Replace the int-style comparator with a strict boolean comparison to comply with the standard and ensure sorting correctness. |
||
|---|---|---|
| .. | ||
| Crypto | ||
| Emu | ||
| Icons | ||
| Input | ||
| Loader | ||
| qt/etc | ||
| rpcs3qt | ||
| tests | ||
| util | ||
| CMakeLists.txt | ||
| Cubeb.vcxproj | ||
| Cubeb.vcxproj.filters | ||
| display_sleep_control.cpp | ||
| display_sleep_control.h | ||
| emucore.vcxproj | ||
| emucore.vcxproj.filters | ||
| frame_icon.xpm | ||
| git-version.cmake | ||
| GLGSRender.vcxproj | ||
| GLGSRender.vcxproj.filters | ||
| headless_application.cpp | ||
| headless_application.h | ||
| main.cpp | ||
| main_application.cpp | ||
| main_application.h | ||
| module_verifier.cpp | ||
| module_verifier.hpp | ||
| resource.h | ||
| resources.qrc | ||
| rpcs3.cpp | ||
| rpcs3.desktop | ||
| rpcs3.h | ||
| rpcs3.icns | ||
| rpcs3.ico | ||
| rpcs3.metainfo.xml | ||
| rpcs3.plist.in | ||
| rpcs3.png | ||
| rpcs3.rc | ||
| rpcs3.svg | ||
| rpcs3.vcxproj | ||
| rpcs3.vcxproj.filters | ||
| rpcs3_version.cpp | ||
| rpcs3_version.h | ||
| stdafx.cpp | ||
| stdafx.h | ||
| update_helper.sh | ||
| VKGSRender.vcxproj | ||
| VKGSRender.vcxproj.filters | ||
| windows.qrc | ||
| XAudio.vcxproj | ||
| XAudio.vcxproj.filters | ||