mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 13:37:00 -04:00
Fixed warnings
This commit is contained in:
@@ -49,7 +49,8 @@ class MessageCtrl : public wxPanel {
|
|||||||
{
|
{
|
||||||
SetBackgroundStyle(wxBG_STYLE_CUSTOM);
|
SetBackgroundStyle(wxBG_STYLE_CUSTOM);
|
||||||
// icons
|
// 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_INPUT] = wxBitmap(load_resource_image(_("message_input")));
|
||||||
icons[MESSAGE_OUTPUT] = wxBitmap();
|
icons[MESSAGE_OUTPUT] = wxBitmap();
|
||||||
icons[MESSAGE_INFO] = wxBitmap(load_resource_image(_("message_information")));
|
icons[MESSAGE_INFO] = wxBitmap(load_resource_image(_("message_information")));
|
||||||
@@ -233,7 +234,6 @@ class MessageCtrl : public wxPanel {
|
|||||||
void draw(wxDC& dc) const {
|
void draw(wxDC& dc) const {
|
||||||
clearDC(dc, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
clearDC(dc, wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
|
||||||
dc.SetFont(*wxNORMAL_FONT);
|
dc.SetFont(*wxNORMAL_FONT);
|
||||||
int height = GetClientSize().y;
|
|
||||||
FOR_EACH_CONST(msg, messages) {
|
FOR_EACH_CONST(msg, messages) {
|
||||||
draw(dc, *msg);
|
draw(dc, *msg);
|
||||||
}
|
}
|
||||||
@@ -450,11 +450,11 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
ConsolePanel::ConsolePanel(Window* parent, int id)
|
ConsolePanel::ConsolePanel(Window* parent, int id)
|
||||||
: SetWindowPanel(parent, id)
|
: SetWindowPanel(parent, id)
|
||||||
|
, messages(nullptr)
|
||||||
|
, entry(nullptr)
|
||||||
, is_active_window(false)
|
, is_active_window(false)
|
||||||
, blinker_state(0)
|
, blinker_state(0)
|
||||||
, blinker_timer(this)
|
, blinker_timer(this)
|
||||||
, messages(nullptr)
|
|
||||||
, entry(nullptr)
|
|
||||||
{
|
{
|
||||||
// init controls
|
// init controls
|
||||||
splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
|
splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
|
||||||
@@ -617,7 +617,7 @@ void ConsolePanel::start_blinker() {
|
|||||||
}
|
}
|
||||||
void ConsolePanel::stop_blinker() {
|
void ConsolePanel::stop_blinker() {
|
||||||
blinker_state = 0;
|
blinker_state = 0;
|
||||||
new_errors_since_last_view = static_cast<MessageType>(0);
|
new_errors_since_last_view = MESSAGE_NONE;
|
||||||
blinker_timer.Stop();
|
blinker_timer.Stop();
|
||||||
update_blinker();
|
update_blinker();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ private:
|
|||||||
|
|
||||||
// notification of new messages
|
// notification of new messages
|
||||||
bool is_active_window;
|
bool is_active_window;
|
||||||
MessageType new_errors_since_last_view;
|
MessageType new_errors_since_last_view = MESSAGE_NONE;
|
||||||
int blinker_state;
|
int blinker_state;
|
||||||
wxTimer blinker_timer;
|
wxTimer blinker_timer;
|
||||||
static const int MAX_BLINKS = 6;
|
static const int MAX_BLINKS = 6;
|
||||||
|
|||||||
@@ -353,7 +353,6 @@ void update_size(LineLayout& layout, TextViewer::Line const& l) {
|
|||||||
TextLayoutP TextViewer::extractLayoutInfo() const {
|
TextLayoutP TextViewer::extractLayoutInfo() const {
|
||||||
// store information about the content/layout
|
// store information about the content/layout
|
||||||
TextLayoutP layout = make_intrusive<TextLayout>();
|
TextLayoutP layout = make_intrusive<TextLayout>();
|
||||||
LineBreak last_break = BREAK_LINE;
|
|
||||||
LineLayoutP paragraph, block;
|
LineLayoutP paragraph, block;
|
||||||
for (auto const& l : lines) {
|
for (auto const& l : lines) {
|
||||||
LineLayoutP line = make_intrusive<LineLayout>(l.width(), l.top, l.line_height, LineLayout::Type::LINE);
|
LineLayoutP line = make_intrusive<LineLayout>(l.width(), l.top, l.line_height, LineLayout::Type::LINE);
|
||||||
|
|||||||
+2
-1
@@ -139,7 +139,8 @@ extern bool write_errors_to_cli;
|
|||||||
|
|
||||||
/// Types/levels of (error)messages
|
/// Types/levels of (error)messages
|
||||||
enum MessageType
|
enum MessageType
|
||||||
{ MESSAGE_INPUT
|
{ MESSAGE_NONE
|
||||||
|
, MESSAGE_INPUT
|
||||||
, MESSAGE_OUTPUT
|
, MESSAGE_OUTPUT
|
||||||
, MESSAGE_INFO
|
, MESSAGE_INFO
|
||||||
, MESSAGE_WARNING
|
, MESSAGE_WARNING
|
||||||
|
|||||||
Reference in New Issue
Block a user