Skip to content

Commit

Permalink
Minor simplification of fa3b7df
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Feb 24, 2018
1 parent fa3b7df commit 4cb0671
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/cursor.cpp
Expand Up @@ -143,14 +143,12 @@ SDL_Cursor* get_cursor(cursor::CURSOR_TYPE type)
const surface surf(image::get_image(color_prefix + data.image_color));

// Construct a temporary ptr to provide a new deleter.
cursor_ptr_t temp(SDL_CreateColorCursor(surf, data.hot_x, data.hot_y), SDL_FreeCursor);
data.cursor = std::move(temp);
data.cursor = cursor_ptr_t(SDL_CreateColorCursor(surf, data.hot_x, data.hot_y), SDL_FreeCursor);
} else {
const surface surf(image::get_image(bw_prefix + data.image_bw));

// Construct a temporary ptr to provide a new deleter.
cursor_ptr_t temp(create_cursor(surf), SDL_FreeCursor);
data.cursor = std::move(temp);
data.cursor = cursor_ptr_t(create_cursor(surf), SDL_FreeCursor);
}

data.is_color = use_color;
Expand Down

0 comments on commit 4cb0671

Please sign in to comment.