1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Cpp11 initializers 2 (#5999)

* C++11 patchset 10: continue cleanup on constructors

* Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop)

* More classes cleanup

* More classes cleanup + change NULL tests to boolean tests
This commit is contained in:
Loïc Blot 2017-06-17 19:11:28 +02:00 committed by GitHub
parent 76be103a91
commit 8f7785771b
59 changed files with 326 additions and 639 deletions

View file

@ -52,18 +52,11 @@ public:
*/
struct DynamicData
{
s32 selected;
s32 scrollpos;
s32 keynav_time;
s32 selected = 0;
s32 scrollpos = 0;
s32 keynav_time = 0;
core::stringw keynav_buffer;
std::set<s32> opened_trees;
DynamicData()
{
selected = 0;
scrollpos = 0;
keynav_time = 0;
}
};
/*
@ -187,27 +180,27 @@ protected:
std::vector<Row> m_rows;
// Table content (only visible; indices into m_rows)
std::vector<s32> m_visible_rows;
bool m_is_textlist;
bool m_has_tree_column;
bool m_is_textlist = false;
bool m_has_tree_column = false;
// Selection status
s32 m_selected; // index of row (1...n), or 0 if none selected
s32 m_sel_column;
bool m_sel_doubleclick;
s32 m_selected = -1; // index of row (1...n), or 0 if none selected
s32 m_sel_column = 0;
bool m_sel_doubleclick = false;
// Keyboard navigation stuff
u64 m_keynav_time;
core::stringw m_keynav_buffer;
u64 m_keynav_time = 0;
core::stringw m_keynav_buffer = L"";
// Drawing and geometry information
bool m_border;
video::SColor m_color;
video::SColor m_background;
video::SColor m_highlight;
video::SColor m_highlight_text;
s32 m_rowheight;
gui::IGUIFont *m_font;
gui::IGUIScrollBar *m_scrollbar;
bool m_border = true;
video::SColor m_color = video::SColor(255, 255, 255, 255);
video::SColor m_background = video::SColor(255, 0, 0, 0);
video::SColor m_highlight = video::SColor(255, 70, 100, 50);
video::SColor m_highlight_text = video::SColor(255, 255, 255, 255);
s32 m_rowheight = 1;
gui::IGUIFont *m_font = nullptr;
gui::IGUIScrollBar *m_scrollbar = nullptr;
// Allocated strings and images
std::vector<core::stringw> m_strings;