Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDWinMain: Fix calling virtual function from the ctor and dtor #381

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 11 additions & 10 deletions src/winmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ JDWinMain::JDWinMain( const bool init, const bool skip_setupdiag,
{
#ifdef _DEBUG
std::cout << "JDWinMain::JDWinMain init = " << init << std::endl
<< "x y w h = " << get_x_win() << " " << get_y_win()
<< " " << get_width_win() << " " << get_height_win() << std::endl;
<< "x y w h = " << JDWinMain::get_x_win() << " " << JDWinMain::get_y_win()
<< " " << JDWinMain::get_width_win() << " " << JDWinMain::get_height_win() << std::endl;
#endif

setlocale( LC_ALL, "ja_JP.UTF-8" );
Expand All @@ -61,23 +61,23 @@ JDWinMain::JDWinMain( const bool init, const bool skip_setupdiag,
bool cancel_maximize = false;
if( init_w >= 0 ){
cancel_maximize = true;
set_width_win( init_w );
JDWinMain::set_width_win( init_w );
}
if( init_h >= 0 ){
cancel_maximize = true;
set_height_win( init_h );
JDWinMain::set_height_win( init_h );
}
if( init_x >= 0 ){
cancel_maximize = true;
set_x_win( init_x );
JDWinMain::set_x_win( init_x );
}
if( init_y >= 0 ){
cancel_maximize = true;
set_y_win( init_y );
JDWinMain::set_y_win( init_y );
}
if( cancel_maximize ){
set_maximized_win( false );
set_full_win( false );
JDWinMain::set_maximized_win( false );
JDWinMain::set_full_win( false );
}

// サイズ変更
Expand Down Expand Up @@ -109,8 +109,9 @@ JDWinMain::JDWinMain( const bool init, const bool skip_setupdiag,
JDWinMain::~JDWinMain()
{
#ifdef _DEBUG
std::cout << "JDWinMain::~JDWinMain window size : x = " << get_x_win() << " y = " << get_y_win()
<< " w = " << get_width_win() << " h = " << get_height_win() << " max = " << is_maximized_win() << std::endl;
std::cout << "JDWinMain::~JDWinMain window size : x = " << JDWinMain::get_x_win()
<< " y = " << JDWinMain::get_y_win() << " w = " << JDWinMain::get_width_win()
<< " h = " << JDWinMain::get_height_win() << " max = " << JDWinMain::is_maximized_win() << std::endl;
#endif

if( m_core ){
Expand Down