mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-21 01:54:19 +00:00
19bf435d6a
According to cppcheck's `redundantInitialization` and `redundantAssignment` errors: ``` src\game\client\ui.cpp:456:5: style: Redundant initialization for 'tw'. The initialized value is overwritten before it is read. [redundantInitialization] tw = TextRender()->TextWidth(0, Size, pText, -1, LabelProps.m_MaxWidth, &AlignedSize, &MaxCharacterHeightInLine); ^ src\game\client\ui.cpp:454:11: note: tw is initialized float tw = std::numeric_limits<float>::max(); ^ src\game\client\ui.cpp:456:5: note: tw is overwritten tw = TextRender()->TextWidth(0, Size, pText, -1, LabelProps.m_MaxWidth, &AlignedSize, &MaxCharacterHeightInLine); ^ src\game\client\ui.cpp:529:5: style: Redundant initialization for 'tw'. The initialized value is overwritten before it is read. [redundantInitialization] tw = TextRender()->TextWidth(0, Size, pText, -1, LabelProps.m_MaxWidth, &AlignedSize, &MaxCharacterHeightInLine); ^ src\game\client\ui.cpp:527:11: note: tw is initialized float tw = std::numeric_limits<float>::max(); ^ src\game\client\ui.cpp:529:5: note: tw is overwritten tw = TextRender()->TextWidth(0, Size, pText, -1, LabelProps.m_MaxWidth, &AlignedSize, &MaxCharacterHeightInLine); ^ src\game\editor\editor.cpp:6051:19: style: Variable 'm_Map.m_Modified' is reassigned a value before the old one has been used. [redundantAssignment] m_Map.m_Modified = false; ^ src\game\editor\editor.cpp:6046:19: note: m_Map.m_Modified is assigned m_Map.m_Modified = false; ^ src\game\editor\editor.cpp:6051:19: note: m_Map.m_Modified is overwritten m_Map.m_Modified = false; ^ src\game\client\prediction\entities\character.cpp:1148:36: style: Variable 'm_LatestInput' is reassigned a value before the old one has been used. [redundantAssignment] m_LatestPrevInput = m_LatestInput = m_PrevInput = m_SavedInput = m_Input; ^ src\game\client\prediction\entities\character.cpp:1134:16: note: m_LatestInput is assigned m_LatestInput = m_LatestPrevInput = m_PrevInput = m_Input = m_SavedInput; ^ src\game\client\prediction\entities\character.cpp:1148:36: note: m_LatestInput is overwritten m_LatestPrevInput = m_LatestInput = m_PrevInput = m_SavedInput = m_Input; ^ src\game\client\prediction\entities\character.cpp:1148:20: style: Variable 'm_LatestPrevInput' is reassigned a value before the old one has been used. [redundantAssignment] m_LatestPrevInput = m_LatestInput = m_PrevInput = m_SavedInput = m_Input; ^ src\game\client\prediction\entities\character.cpp:1134:36: note: m_LatestPrevInput is assigned m_LatestInput = m_LatestPrevInput = m_PrevInput = m_Input = m_SavedInput; ^ src\game\client\prediction\entities\character.cpp:1148:20: note: m_LatestPrevInput is overwritten m_LatestPrevInput = m_LatestInput = m_PrevInput = m_SavedInput = m_Input; ^ src\game\client\prediction\entities\character.cpp:1148:50: style: Variable 'm_PrevInput' is reassigned a value before the old one has been used. [redundantAssignment] m_LatestPrevInput = m_LatestInput = m_PrevInput = m_SavedInput = m_Input; ^ src\game\client\prediction\entities\character.cpp:1134:50: note: m_PrevInput is assigned m_LatestInput = m_LatestPrevInput = m_PrevInput = m_Input = m_SavedInput; ^ src\game\client\prediction\entities\character.cpp:1148:50: note: m_PrevInput is overwritten m_LatestPrevInput = m_LatestInput = m_PrevInput = m_SavedInput = m_Input; ^ ``` |
||
---|---|---|
.. | ||
auto_map.cpp | ||
auto_map.h | ||
editor.cpp | ||
editor.h | ||
explanations.cpp | ||
io.cpp | ||
layer_game.cpp | ||
layer_quads.cpp | ||
layer_sounds.cpp | ||
layer_tiles.cpp | ||
popups.cpp |