Fixed warnings

This commit is contained in:
Twan van Laarhoven
2020-05-12 17:49:42 +02:00
parent e6af772ebd
commit e7d0a2106d
4 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -49,7 +49,8 @@ class MessageCtrl : public wxPanel {
{
SetBackgroundStyle(wxBG_STYLE_CUSTOM);
// icons
BOOST_STATIC_ASSERT(MESSAGE_TYPE_MAX == 6);
static_assert(MESSAGE_TYPE_MAX == 7);
icons[MESSAGE_NONE] = wxBitmap();
icons[MESSAGE_INPUT] = wxBitmap(load_resource_image(_("message_input")));
icons[MESSAGE_OUTPUT] = wxBitmap();
icons[MESSAGE_INFO] = wxBitmap(load_resource_image(_("message_information")));
@@ -233,7 +234,6 @@ class MessageCtrl : public wxPanel {
void draw(wxDC& dc) const {
clearDC(dc, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
dc.SetFont(*wxNORMAL_FONT);
int height = GetClientSize().y;
FOR_EACH_CONST(msg, messages) {
draw(dc, *msg);
}
@@ -450,11 +450,11 @@ END_EVENT_TABLE()
ConsolePanel::ConsolePanel(Window* parent, int id)
: SetWindowPanel(parent, id)
, messages(nullptr)
, entry(nullptr)
, is_active_window(false)
, blinker_state(0)
, blinker_timer(this)
, messages(nullptr)
, entry(nullptr)
{
// init controls
splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
@@ -617,7 +617,7 @@ void ConsolePanel::start_blinker() {
}
void ConsolePanel::stop_blinker() {
blinker_state = 0;
new_errors_since_last_view = static_cast<MessageType>(0);
new_errors_since_last_view = MESSAGE_NONE;
blinker_timer.Stop();
update_blinker();
}
+1 -1
View File
@@ -55,7 +55,7 @@ private:
// notification of new messages
bool is_active_window;
MessageType new_errors_since_last_view;
MessageType new_errors_since_last_view = MESSAGE_NONE;
int blinker_state;
wxTimer blinker_timer;
static const int MAX_BLINKS = 6;