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
Fix Xcode warnings #6793
Fix Xcode warnings #6793
Conversation
I should have added that this is currently for the debug build only, and that another step will be to make the flags the same for debug and release builds. |
@@ -363,7 +363,7 @@ namespace { // Private helpers for move_unit() | |||
, real_end_(begin_) | |||
// Unit information: | |||
, move_it_(resources::gameboard->units().find(*begin_)) | |||
, orig_side_(( assert(move_it_ != resources::gameboard->units().end()), move_it_->side() )) | |||
, orig_side_(( static_cast<void>(assert(move_it_ != resources::gameboard->units().end())), move_it_->side() )) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is actually just wrong both ways. The correct fix here is probably to move it (and any other line referencing move_it_
, like the following three) into the constructor body as assignments.
Basically, delete these four lines and add something like the following just above if(!is_ai_move())
:
assert(move_it_ != resources::gameboard->units().end());
orig_side_ = move_it_->side();
orig_moves_ = move_it_->movement_left();
orig_dir_ = move_it_->facing();
goto_ = is_ai_move() ? move_it_->get_goto() : route.back();
@@ -6429,7 +6429,9 @@ | |||
460F21CA2858F72100EE2131 /* SignedRelease */ = { | |||
isa = XCBuildConfiguration; | |||
buildSettings = { | |||
ALWAYS_SEARCH_USER_PATHS = NO; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm kinda surprised this didn't just break everything...
Trying to fix the Xcode warnings. I'm putting this up here to see what the CI run says, and also because in some cases I do not know if what I did is the preferred solution. So let me know what needs to be changed.