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

Fix compilation errors related to cube_direction operators #51494

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

eltank
Copy link
Contributor

@eltank eltank commented Sep 9, 2021

Summary

Bugfixes "Fix compilation errors related to cube_direction operators"

Purpose of change

Band-aid fix for recent compilation issue affecting most PRs. See #51317

Describe the solution

Remove the stuff that's not constexpr from the constexpr operators of cube_direction.
There's probably a better way to fix this, but this should work in the short-term.

Describe alternatives you've considered

Making the operators not constexpr, dropping the static asserts and making a unit test. Requires moving the cube_direction declaration into the header.

Testing

Relying on CI to verify this.

Additional context

@actual-nh actual-nh added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style (P2 - High) High priority (for ex. important bugfixes) labels Sep 9, 2021
@jbytheway
Copy link
Contributor

Thanks for catching this when I failed to notice it in CI.

This is a reasonable stopgap solution. I'll try to look for a better one tomorrow.

@actual-nh
Copy link
Contributor

Once it passes the cross-compile, I'd say it's ready for merging.

@actual-nh
Copy link
Contributor

WTF? It fails on clang for MacOS, precisely the compiler (and OS, possibly due to compiler) it wasn't failing earlier?

@eltank
Copy link
Contributor Author

eltank commented Sep 9, 2021

WTF? It fails on clang for MacOS, precisely the compiler (and OS, possibly due to compiler) it wasn't failing earlier?

The error is:

ERROR : src/overmap.cpp:1574 [std::vector<tripoint_om_omt> mutable_overmap_special_data::place(overmap &, const tripoint_om_omt &) const] Spawn of mutable special anthill had unresolved joins.  Existing terrain at (157,0,-1) was ants_ew; joins were south: tunnel_to_tunnel1.385 s: mx_minefield theoretical spawn

That's unrelated to this PR and probably non-deterministic (something for @jbytheway to look into)

@jbytheway
Copy link
Contributor

Agreed, that's unrelated, non-deterministic, and for me to look into.

@kevingranade kevingranade merged commit dee56c0 into CleverRaven:master Sep 9, 2021
@eltank eltank deleted the build_fix branch September 9, 2021 23:22
Venera3 pushed a commit to Venera3/Cataclysm-DDA that referenced this pull request Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style (P2 - High) High priority (for ex. important bugfixes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants