Give optimisation hints to compiler (#2929)

feat(invoker): add compiler hints
chore(get network event data): added translation TODO
feat(native hooks): add compiler hint to crashes
feat(render): add likely compiler hint to on_present
feat(thread pool): add compiler hints
Added hook likely/unlikely switches to debug/crash scenarios.
Added HEX_TO_UPPER call on the AC verifier offsets.
Added more fuzzer unlikely attributes.
Replaced some hard coded numbers with their unhashed _J variants.
Added more unlikely attributes to singleton initializer checks.
Added more likely/unlikely attributes to certain scenarios.
This commit is contained in:
Andreas Maerten
2024-04-22 19:48:22 +02:00
committed by GitHub
parent e32fee1252
commit fcdeeba7ed
40 changed files with 113 additions and 111 deletions
@@ -5,7 +5,7 @@ namespace big
{
void hooks::received_clone_remove(CNetworkObjectMgr* mgr, CNetGamePlayer* src, CNetGamePlayer* dst, int16_t object_id, uint32_t ownership_token)
{
if (dst->m_player_info->m_ped->m_net_object->m_object_id == object_id)
if (dst->m_player_info->m_ped->m_net_object->m_object_id == object_id) [[unlikely]]
{
notify::crash_blocked(src, "player ped removal");
return;