mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-11 10:38:20 +00:00
e134e4e488
According to cppcheck's `knownConditionTrueFalse` error: ``` src\base\system.cpp:1776:11: style: The comparison 'bytes == 0' is always true. [knownConditionTrueFalse] if(bytes == 0 && sock->ipv4sock >= 0) ^ src\base\system.cpp:1742:14: note: 'bytes' is assigned value '0' here. int bytes = 0; ^ src\base\system.cpp:1776:11: note: The comparison 'bytes == 0' is always true. if(bytes == 0 && sock->ipv4sock >= 0) ^ src\game\editor\io.cpp:887:33: style: Condition 'pSoundsItem->m_Version>=1' is always true [knownConditionTrueFalse] if(pSoundsItem->m_Version >= 1) ^ src\game\editor\io.cpp:874:33: note: Assuming that condition 'pSoundsItem->m_Version<1' is not redundant if(pSoundsItem->m_Version < 1 || pSoundsItem->m_Version > CMapItemLayerSounds::CURRENT_VERSION) ^ src\game\editor\io.cpp:887:33: note: Condition 'pSoundsItem->m_Version>=1' is always true if(pSoundsItem->m_Version >= 1) ^ src\game\editor\io.cpp:914:33: style: Condition 'pSoundsItem->m_Version>=1' is always true [knownConditionTrueFalse] if(pSoundsItem->m_Version >= 1) ^ src\game\editor\io.cpp:901:33: note: Assuming that condition 'pSoundsItem->m_Version<1' is not redundant if(pSoundsItem->m_Version < 1 || pSoundsItem->m_Version > CMapItemLayerSounds::CURRENT_VERSION) ^ src\game\editor\io.cpp:914:33: note: Condition 'pSoundsItem->m_Version>=1' is always true if(pSoundsItem->m_Version >= 1) ^ src\engine\client\backend\opengl\backend_opengl.cpp:207:68: style: Condition '*pStr=='\0'' is always false [knownConditionTrueFalse] else if(LastWasNumber && (*pStr == '.' || *pStr == ' ' || *pStr == '\0')) ^ src\game\client\components\maplayers.cpp:851:110: style: Condition 'DoTextureCoords' is always true [knownConditionTrueFalse] mem_copy_special(pUploadData + sizeof(vec2), pTmpTileTexCoords, sizeof(vec3), vtmpTiles.size() * 4, (DoTextureCoords ? (sizeof(vec2)) : 0)); ^ src\game\client\components\maplayers.cpp:849:11: note: Assuming that condition 'DoTextureCoords' is not redundant if(DoTextureCoords) ^ src\game\client\components\maplayers.cpp:851:110: note: Condition 'DoTextureCoords' is always true mem_copy_special(pUploadData + sizeof(vec2), pTmpTileTexCoords, sizeof(vec3), vtmpTiles.size() * 4, (DoTextureCoords ? (sizeof(vec2)) : 0)); ^ src\game\client\prediction\gameworld.cpp:567:5: style: Condition 'm_pParent' is always true [knownConditionTrueFalse] if(m_pParent && m_pParent->m_pChild && m_pParent->m_pChild != this) ^ src\game\client\components\menu_background.cpp:271:7: style: Condition 'NeedImageLoading' is always true [knownConditionTrueFalse] if(NeedImageLoading) ^ src\game\client\components\menu_background.cpp:268:23: note: Assignment 'NeedImageLoading=true', assigned value is 1 NeedImageLoading = true; ^ src\game\client\components\menu_background.cpp:271:7: note: Condition 'NeedImageLoading' is always true if(NeedImageLoading) ^ src\game\editor\editor.cpp:4991:6: style: Condition 'pEnvelope' is always true [knownConditionTrueFalse] if(pEnvelope) ^ ``` |
||
---|---|---|
.. | ||
null | ||
opengl | ||
opengles | ||
vulkan | ||
backend_base.cpp | ||
backend_base.h | ||
glsl_shader_compiler.cpp | ||
glsl_shader_compiler.h |