Skip to content

Commit

Permalink
floating label: remove dead code. Found by cppcheck.
Browse files Browse the repository at this point in the history
[src/floating_label.cpp:261]: (style) Condition 'screen!=nullptr' is always false
[src/floating_label.cpp:281]: (style) Condition 'screen!=nullptr' is always false
  • Loading branch information
matthiaskrgr authored and Vultraz committed Apr 2, 2017
1 parent 0af91c4 commit f6800c6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/floating_label.cpp
Expand Up @@ -257,10 +257,7 @@ SDL_Rect get_floating_label_rect(int handle)

floating_label_context::floating_label_context()
{
surface const screen = nullptr;
if(screen != nullptr) {
draw_floating_labels(screen);
}
const surface screen = nullptr;

label_contexts.push(std::set<int>());
}
Expand All @@ -277,10 +274,7 @@ floating_label_context::~floating_label_context()

label_contexts.pop();

surface const screen = nullptr;
if(screen != nullptr) {
undraw_floating_labels(screen);
}
const surface screen = nullptr;
}

void draw_floating_labels(surface screen)
Expand Down

0 comments on commit f6800c6

Please sign in to comment.