Fixed some syntax errors and clang compiling warnings
GCC/VS2013/Clang is tested
This commit is contained in:
@@ -44,7 +44,6 @@ namespace drawerbase
|
||||
private:
|
||||
static const int interval = 4;
|
||||
widget* widget_;
|
||||
unsigned state_;
|
||||
std::unique_ptr<implement> imptr_;
|
||||
implement * impl_;
|
||||
};
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace nana
|
||||
bool _m_get_trace(point, int & res);
|
||||
void _m_perf_transform(transform_action tfid, graph_reference, graph_reference dirtybuf, graph_reference newbuf, const nana::point& refpos);
|
||||
private:
|
||||
void refresh(graph_reference);
|
||||
void refresh(graph_reference) override;
|
||||
void attached(widget_reference, graph_reference) override;
|
||||
void mouse_move(graph_reference, const arg_mouse&) override;
|
||||
void mouse_leave(graph_reference, const arg_mouse&) override;
|
||||
|
||||
@@ -44,7 +44,6 @@ namespace nana
|
||||
widget * widget_;
|
||||
nana::paint::graphics* graph_;
|
||||
unsigned draw_width_;
|
||||
bool has_value_;
|
||||
bool unknown_;
|
||||
unsigned max_;
|
||||
unsigned value_;
|
||||
|
||||
@@ -180,7 +180,7 @@ namespace nana
|
||||
return false;
|
||||
}
|
||||
private:
|
||||
void attached(widget_reference widget, graph_reference graph)
|
||||
void attached(widget_reference widget, graph_reference graph) override
|
||||
{
|
||||
graph_ = &graph;
|
||||
widget_ = static_cast< ::nana::scroll<Vertical>*>(&widget);
|
||||
@@ -190,12 +190,12 @@ namespace nana
|
||||
timer_.elapse(std::bind(&trigger::_m_tick, this));
|
||||
}
|
||||
|
||||
void detached()
|
||||
void detached() override
|
||||
{
|
||||
graph_ = nullptr;
|
||||
}
|
||||
|
||||
void refresh(graph_reference graph)
|
||||
void refresh(graph_reference graph) override
|
||||
{
|
||||
drawer_.draw(graph, metrics_.what);
|
||||
}
|
||||
@@ -213,7 +213,7 @@ namespace nana
|
||||
API::lazy_refresh();
|
||||
}
|
||||
|
||||
void mouse_move(graph_reference graph, const ::nana::arg_mouse& arg)
|
||||
void mouse_move(graph_reference graph, const ::nana::arg_mouse& arg) override
|
||||
{
|
||||
bool redraw = false;
|
||||
if(metrics_.pressed && (metrics_.what == buttons::scroll))
|
||||
@@ -240,7 +240,7 @@ namespace nana
|
||||
}
|
||||
}
|
||||
|
||||
void mouse_down(graph_reference graph, const arg_mouse& arg)
|
||||
void mouse_down(graph_reference graph, const arg_mouse& arg) override
|
||||
{
|
||||
if(arg.left_button)
|
||||
{
|
||||
@@ -275,7 +275,7 @@ namespace nana
|
||||
}
|
||||
}
|
||||
|
||||
void mouse_up(graph_reference graph, const arg_mouse& arg)
|
||||
void mouse_up(graph_reference graph, const arg_mouse& arg) override
|
||||
{
|
||||
timer_.stop();
|
||||
|
||||
@@ -287,7 +287,7 @@ namespace nana
|
||||
API::lazy_refresh();
|
||||
}
|
||||
|
||||
void mouse_leave(graph_reference graph, const arg_mouse&)
|
||||
void mouse_leave(graph_reference graph, const arg_mouse&) override
|
||||
{
|
||||
if(metrics_.pressed) return;
|
||||
|
||||
@@ -296,7 +296,7 @@ namespace nana
|
||||
API::lazy_refresh();
|
||||
}
|
||||
|
||||
void mouse_wheel(graph_reference graph, const arg_wheel& arg)
|
||||
void mouse_wheel(graph_reference graph, const arg_wheel& arg) override
|
||||
{
|
||||
if(make_step(arg.upwards == false, 3))
|
||||
{
|
||||
|
||||
@@ -45,9 +45,7 @@ namespace nana{ namespace widgets{ namespace skeletons
|
||||
tokenizer(const nana::string& s, bool format_enabled)
|
||||
: iptr_(s.data()),
|
||||
endptr_(s.data() + s.size()),
|
||||
format_enabled_(format_enabled),
|
||||
format_state_(false),
|
||||
revert_token_(token::eof)
|
||||
format_enabled_(format_enabled)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -414,17 +412,14 @@ namespace nana{ namespace widgets{ namespace skeletons
|
||||
}
|
||||
}
|
||||
private:
|
||||
const nana::char_t * iptr_;
|
||||
const nana::char_t * endptr_;
|
||||
const ::nana::char_t * iptr_;
|
||||
const ::nana::char_t * endptr_;
|
||||
const bool format_enabled_;
|
||||
bool format_state_;
|
||||
bool format_state_{false};
|
||||
|
||||
nana::string idstr_;
|
||||
::nana::string idstr_;
|
||||
std::pair<nana::string, nana::string> binary_;
|
||||
|
||||
std::size_t whspace_size_;
|
||||
|
||||
token revert_token_;
|
||||
token revert_token_{token::eof};
|
||||
};
|
||||
|
||||
//The fblock states a format, and a format from which it is inherted
|
||||
@@ -528,7 +523,7 @@ namespace nana{ namespace widgets{ namespace skeletons
|
||||
{
|
||||
public:
|
||||
data_image(const nana::string& imgpath, const nana::size & sz, std::size_t limited)
|
||||
: image_(imgpath), limited_(limited)
|
||||
: image_(imgpath)//, limited_(limited)
|
||||
{
|
||||
size_ = image_.size();
|
||||
|
||||
@@ -597,7 +592,6 @@ namespace nana{ namespace widgets{ namespace skeletons
|
||||
nana::string str_;
|
||||
nana::paint::image image_;
|
||||
nana::size size_;
|
||||
std::size_t limited_;
|
||||
};
|
||||
|
||||
class dstream
|
||||
@@ -928,7 +922,6 @@ namespace nana{ namespace widgets{ namespace skeletons
|
||||
}
|
||||
|
||||
private:
|
||||
bool format_enabled_;
|
||||
std::vector<fblock*> fblocks_;
|
||||
std::list<std::deque<value> > lines_;
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ namespace nana
|
||||
}
|
||||
}
|
||||
|
||||
general_events& _m_get_general_events() const
|
||||
general_events& _m_get_general_events() const override
|
||||
{
|
||||
return *events_;
|
||||
}
|
||||
@@ -275,7 +275,7 @@ namespace nana
|
||||
}
|
||||
}
|
||||
|
||||
general_events& _m_get_general_events() const
|
||||
general_events& _m_get_general_events() const override
|
||||
{
|
||||
return *events_;
|
||||
}
|
||||
@@ -404,7 +404,7 @@ namespace nana
|
||||
API::dev::attach_drawer(*this, trigger_);
|
||||
}
|
||||
|
||||
general_events& _m_get_general_events() const
|
||||
general_events& _m_get_general_events() const override
|
||||
{
|
||||
return *events_;
|
||||
}
|
||||
@@ -487,7 +487,7 @@ namespace nana
|
||||
}
|
||||
}
|
||||
|
||||
general_events& _m_get_general_events() const
|
||||
general_events& _m_get_general_events() const override
|
||||
{
|
||||
return *events_;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ namespace nana
|
||||
class arg_eval;
|
||||
|
||||
template<typename Return>
|
||||
class arg_function
|
||||
class arg_function: public eval_arg
|
||||
{
|
||||
public:
|
||||
arg_function(std::function<Return()> fn)
|
||||
@@ -208,4 +208,4 @@ namespace nana
|
||||
};//end class i18n_eval;
|
||||
}
|
||||
|
||||
#endif//NANA_I18N_HPP
|
||||
#endif//NANA_I18N_HPP
|
||||
|
||||
Reference in New Issue
Block a user