Skip to content

Commit 6ea5c9c

Browse files
committed
fix compiler warnings
1 parent e778f41 commit 6ea5c9c

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

include/nana/gui/widgets/treebox.hpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -110,21 +110,18 @@ namespace nana
110110
public:
111111
struct treebox_node_type
112112
{
113-
treebox_node_type();
114-
treebox_node_type(std::string);
113+
treebox_node_type(std::string = {});
115114
treebox_node_type& operator=(const treebox_node_type&);
116115

117116
::std::string text;
118117
std::any value;
119-
bool expanded;
120-
bool hidden;
121-
bool selected;
122-
checkstate checked;
118+
bool expanded{ false };
119+
bool hidden{ false };
120+
bool selected{ false };
121+
checkstate checked{ checkstate::unchecked };
123122
::std::string img_idstr;
124123
};
125124

126-
struct pseudo_node_type{};
127-
128125
using tree_cont_type = widgets::detail::tree_cont<treebox_node_type>;
129126
using node_type = tree_cont_type::node_type;
130127

source/gui/programming_interface.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,6 +1750,7 @@ namespace api
17501750
return restrict::bedrock.vkeyboard().numeric(wd, padding);
17511751
#else
17521752
(void)wd;
1753+
(void)padding;
17531754
return false;
17541755
#endif
17551756
}

source/gui/widgets/menu.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,6 @@ namespace nana
735735
{
736736
nana::size size = _m_client_size();
737737

738-
unsigned int two = platform_abstraction::dpi_scale(widget_->handle(), 2u);
739738
size.width += platform_abstraction::dpi_scale(widget_->handle(), detail_.border.x) * 2u;
740739
size.height += platform_abstraction::dpi_scale(widget_->handle(), detail_.border.y) * 2u;
741740

source/gui/widgets/treebox.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,8 @@ namespace nana
845845

846846
bool set_selected_multi(node_type* node, bool crtl, bool shift)
847847
{
848+
(void)shift;
849+
848850
if (crtl)
849851
{
850852
data.stop_drawing = true;
@@ -956,7 +958,7 @@ namespace nana
956958
if(node_state.selected != node)
957959
{
958960
data.stop_drawing = true;
959-
if (node_state.selected && single_selection || node == nullptr)
961+
if ((node_state.selected && single_selection) || !node)
960962
{
961963
auto nodes_copy = node_state.nodes_selected;
962964
node_state.clear();
@@ -1911,12 +1913,9 @@ namespace nana
19111913

19121914
//class trigger
19131915
//struct treebox_node_type
1914-
trigger::treebox_node_type::treebox_node_type()
1915-
:expanded(false), hidden(false), checked(checkstate::unchecked), selected(false)
1916-
{}
19171916

19181917
trigger::treebox_node_type::treebox_node_type(std::string text)
1919-
:text(std::move(text)), expanded(false), hidden(false), checked(checkstate::unchecked), selected(false)
1918+
:text(std::move(text))
19201919
{}
19211920

19221921
trigger::treebox_node_type& trigger::treebox_node_type::operator=(const treebox_node_type& rhs)

0 commit comments

Comments
 (0)