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
Merged

[RDY]Fixed compile problem in VS. #21647

merged 3 commits into from Aug 18, 2017

Conversation

Maddremor
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor Author

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
@Maddremor Maddremor deleted the non-normal-compile-fix branch September 15, 2017 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants