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

ImgLoader: Fix member initialization #247

Merged
merged 1 commit into from
Apr 23, 2020
Merged
Show file tree
Hide file tree
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
8 changes: 2 additions & 6 deletions src/jdlib/imgloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ using namespace JDLIB;
/* constructions ******************************************/

ImgLoader::ImgLoader( const std::string& file )
: m_file( file ),
m_width( 0 ),
m_height( 0 ),
m_stop( false ),
m_y( 0 ),
m_loadedlevel( LOADLEVEL_INIT )
: m_file( file )
, m_loadedlevel( LOADLEVEL_INIT )
{
#ifdef _DEBUG
std::cout << "ImgLoader::ImgLoader file = " << m_file << std::endl;
Expand Down
12 changes: 6 additions & 6 deletions src/jdlib/imgloader.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ namespace JDLIB

std::string m_file;
std::string m_errmsg;
int m_width;
int m_height;
bool m_stop;
int m_y;
int m_loadlevel;
int m_width{};
int m_height{};

bool m_stop{};
int m_y{};
int m_loadlevel{};
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#241 (review) と同じくm_loadlevelはscoped enumを使ったほうが良いですが今はcppcheckの警告修正を優先します。

int m_loadedlevel;

public:
Expand Down