Skip to content

Commit

Permalink
Initialise a member in the initialiser list.
Browse files Browse the repository at this point in the history
  • Loading branch information
mordante committed Apr 6, 2014
1 parent 1ad329c commit bf20045
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sdl/texture.cpp
Expand Up @@ -42,10 +42,10 @@ ttexture::ttexture(SDL_Renderer& renderer,
const std::string& file,
int access,
bool keep_surface)
: reference_count_(new unsigned(1)), texture_(NULL), source_surface_(NULL)
: reference_count_(new unsigned(1))
, texture_(NULL)
, source_surface_(IMG_Load(file.c_str()))
{
source_surface_ = IMG_Load(file.c_str());

if(source_surface_ == NULL) {
throw texception("Failed to create SDL_Texture object.", true);
}
Expand Down

0 comments on commit bf20045

Please sign in to comment.