Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix more GCC 8.1 warnings 1 master
Fix 3 warnings reported by GCC 8.1 of the following type ```src/client/gameui.cpp:191:43: warning: « void* memset(void*, int, size_t) » effacement d'un objet du type non trivial « struct GameUI::Flags »; use assignment or value-initialization instead [-Wclass-memaccess] memset(&m_flags, 0, sizeof(GameUI::Flags)); ```
- Loading branch information
Showing
3 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -188,7 +188,7 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_ | |
|
||
void GameUI::initFlags() | ||
{ | ||
memset(&m_flags, 0, sizeof(GameUI::Flags)); | ||
m_flags = GameUI::Flags(); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
nerzhul
Author
Member
|
||
m_flags.show_chat = true; | ||
m_flags.show_hud = true; | ||
m_flags.show_debug = g_settings->getBool("show_debug"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Turns out that this changes the behavior.
Before this change show_minimap and show_profiler_graph were false, no they are true.