mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 00:20:16 +00:00
Fix real bugs found by clang-tidy
- game_handler.cpp: use-after-move on node.id after std::move(node) (save nodeId before the move) - tcp_socket.cpp, world_socket.cpp: virtual call in destructor bypasses dispatch; use qualified TCPSocket::disconnect() / WorldSocket::disconnect() to make intent explicit - wmo_renderer.cpp: float loop counters risk precision drift; replace with integer step counts and reconstruct float from index - game_screen.cpp: (float + 0.5) cast to int is incorrect rounding; use std::lround instead
This commit is contained in:
parent
ba3d569e5f
commit
eacecddfb0
5 changed files with 13 additions and 8 deletions
|
|
@ -5462,7 +5462,7 @@ void GameScreen::renderSettingsWindow() {
|
|||
break;
|
||||
}
|
||||
}
|
||||
pendingUiOpacity = static_cast<int>(uiOpacity_ * 100.0f + 0.5f);
|
||||
pendingUiOpacity = static_cast<int>(std::lround(uiOpacity_ * 100.0f));
|
||||
pendingMinimapRotate = minimapRotate_;
|
||||
pendingMinimapSquare = minimapSquare_;
|
||||
if (renderer) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue