mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 11:38:19 +00:00
65aa584b9f
According to cppcheck's `redundantCondition` and `multiCondition` errors: ``` src\engine\client\backend\glsl_shader_compiler.cpp:70:39: style: Redundant condition: The condition '*(pBuff+1)' is redundant since '*(pBuff+1) == 'i'' is sufficient. [redundantCondition] if(*pBuff == ' ' && *(pBuff + 1) && *(pBuff + 1) == 'i' && *(pBuff + 2) == 'n') ^ src\engine\client\backend\glsl_shader_compiler.cpp:98:45: style: Redundant condition: The condition '*(pBuff+1)' is redundant since '*(pBuff+1) == 'u'' is sufficient. [redundantCondition] else if(*pBuff == 'o' && *(pBuff + 1) && *(pBuff + 1) == 'u' && *(pBuff + 2) == 't') ^ src\game\client\gameclient.cpp:1665:62: style: Redundant condition: m_aShowOthers[g_Config.m_ClDummy]!=SHOW_OTHERS_NOT_SET. 'A || (!A && B)' is equivalent to 'A || B' [redundantCondition] if(m_aShowOthers[g_Config.m_ClDummy] == SHOW_OTHERS_NOT_SET || (m_aShowOthers[g_Config.m_ClDummy] != SHOW_OTHERS_NOT_SET && m_aShowOthers[g_Config.m_ClDummy] != g_Config.m_ClShowOthers)) ^ src\game\client\prediction\entities\projectile.cpp:104:34: style: Redundant condition: pTargetChr. '!A || (A && B)' is equivalent to '!A || B' [redundantCondition] if(m_Explosive && (!pTargetChr || (pTargetChr && (!m_Freeze || (m_Type == WEAPON_SHOTGUN && Collide))))) ^ src\engine\client\backend\vulkan\backend_vulkan.cpp:6588:11: style: Expression is always true because 'else if' condition is opposite to previous condition at line 6578. [multiCondition] else if(!pCommand->m_ByResize) ^ src\engine\client\backend\vulkan\backend_vulkan.cpp:6578:14: note: first condition if(pCommand->m_ByResize) ^ src\engine\client\backend\vulkan\backend_vulkan.cpp:6588:11: note: else if condition is opposite to first condition else if(!pCommand->m_ByResize) ^ ``` |
||
---|---|---|
.. | ||
character.cpp | ||
character.h | ||
laser.cpp | ||
laser.h | ||
pickup.cpp | ||
pickup.h | ||
projectile.cpp | ||
projectile.h |