Skip to content
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

[RDY]Fixed compile problem in VS. #21647

Merged
merged 3 commits into from Aug 18, 2017

Conversation

Projects
None yet
2 participants
@Maddremor
Copy link
Contributor

commented Aug 17, 2017

Since RP #21603 got merged the game no longer compiles on my Visual Studio setup, commit 32bc9fd being the culprit. Removing non_normal seems to have resolved this. However, I have no idea what that actually does, so if anyone can give this a look over, I would appreciate it.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Aug 17, 2017

non_normal has to be there. It is very, very important.
It marks a tile as something that isn't flat ground with default move cost. If it is removed, entire pathfinding will break completely and only return straight lines.

Looks like different compilers handle constexpr differently. VS must treat it as a local variable, while clang and gcc treat it as static. static variables don't need to (can't) be captured in a lambda, so just explicitly capturing it regardless of staticness will make some compilers complain.

This should be fixed by making non_normal a static const, static constexpr or something like that. This should be enough. If it isn't enough, it could be turned into a local variable (non-static, non-constexpr) and captured explicitly.

@Maddremor

This comment has been minimized.

Copy link
Contributor Author

commented Aug 17, 2017

Hey, I understood some of those words!

But seriously, this is probably better dealt with by someone who has moved beyond the simian dev methodology. I just removed non_normal and hoped for the best.

@Maddremor

This comment has been minimized.

Copy link
Contributor Author

commented Aug 17, 2017

Now it compiles and pathfinding seems to work in-game.

@Maddremor Maddremor changed the title [CR] Fixed compile problem in VS. [RDY]Fixed compile problem in VS. Aug 17, 2017

@Coolthulhu Coolthulhu self-assigned this Aug 18, 2017

@Coolthulhu Coolthulhu merged commit 2d41bdc into CleverRaven:master Aug 18, 2017

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.3%) to 23.19%
Details
gorgon-ghprb Build finished.
Details

@Maddremor Maddremor deleted the Maddremor:non-normal-compile-fix branch Sep 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.