Skip to content

Commit

Permalink
PaneControl: Fix member initialization (#248)
Browse files Browse the repository at this point in the history
メンバ変数の初期化を変更してcppcheckの警告
(warning) Member variable 'PaneControl::m_pos' is not initialized in
the constructor. を修正する。

[src/skeleton/panecontrol.cpp:15]: (warning) Member variable 'PaneControl::m_pos' is not initialized in the constructor.
  • Loading branch information
ma8ma committed Apr 23, 2020
1 parent e85a236 commit c333211
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
16 changes: 6 additions & 10 deletions src/skeleton/panecontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@ enum
};

PaneControl::PaneControl( Gtk::Paned& paned, int fixmode )
: m_paned( paned ),
m_click_fold( PANE_CLICK_NORMAL ),
m_clicked( false ),
m_drag( false ),
m_on_paned( false ),
m_fixmode( fixmode ),
m_mode( PANE_NORMAL )
{
m_pre_size = -1;
}
: m_paned( paned )
, m_click_fold( PANE_CLICK_NORMAL )
, m_fixmode( fixmode )
, m_mode( PANE_NORMAL )
, m_pre_size{ -1 }
{}


PaneControl::~PaneControl() noexcept = default;
Expand Down
8 changes: 4 additions & 4 deletions src/skeleton/panecontrol.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ namespace SKELETON

int m_click_fold;

bool m_clicked;
bool m_drag;
bool m_on_paned;
bool m_clicked{};
bool m_drag{};
bool m_on_paned{};

int m_fixmode;
int m_mode;
int m_pos;
int m_pos{};

int m_pre_size;

Expand Down

0 comments on commit c333211

Please sign in to comment.