Skip to content

Commit

Permalink
Merge pull request #6705 from bencsikandrei/various_fixes_arrow_c_h_pp
Browse files Browse the repository at this point in the history
Add explicit + some cleanup in arrow.h/cpp
  • Loading branch information
Vultraz committed May 13, 2022
2 parents 87d5746 + 985fdec commit e5dbbf6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/arrow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ void arrow::hide()
{
if(hidden_)
return;

hidden_ = true;

if(display* disp = display::get_singleton()) {
Expand All @@ -63,6 +64,7 @@ void arrow::show()
{
if(!hidden_)
return;

hidden_ = false;

if(display* disp = display::get_singleton()) {
Expand Down Expand Up @@ -146,10 +148,7 @@ void arrow::draw_hex(const map_location& hex)

bool arrow::valid_path(const arrow_path_t& path)
{
if (path.size() >= 2)
return true;
else
return false;
return (path.size() >= 2);
}

void arrow::update_symbols()
Expand Down
2 changes: 1 addition & 1 deletion src/arrow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class arrow {
arrow(const arrow&) = delete;
arrow& operator=(const arrow&) = delete;

arrow(bool hidden = false);
explicit arrow(bool hidden = false);
virtual ~arrow();

/** Sets the arrow's visibility */
Expand Down

0 comments on commit e5dbbf6

Please sign in to comment.