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 false positive no return warnings in msvc #2132

Merged
merged 1 commit into from
Oct 30, 2022

Conversation

olanti-p
Copy link
Contributor

Summary

SUMMARY: Build "Fix false positive no return warnings in msvc"

Purpose of change

Fix warnings in lightmap.cpp:

src\lightmap.cpp(1148): warning C4715: '<lambda_5114cbcce979430cdc53a0f312cda1c1>::operator()': not all control paths return a value
src\lightmap.cpp(849): warning C4715: '<lambda_97faf4a5c59a05aa0c0ff99c9f164228>::operator()': not all control paths return a value

Describe the solution

Add a platform-independent unreachable() hint found at Stackoverflow (https://stackoverflow.com/a/65258501)

Describe alternatives you've considered

c++23

Testing

Game compiles with no warnings in VS, does not crash and burn when loading a save.

@olanti-p olanti-p requested a review from joveeater October 27, 2022 20:17
@Coolthulhu Coolthulhu self-assigned this Oct 30, 2022
@Coolthulhu Coolthulhu merged commit 999e92e into cataclysmbnteam:upload Oct 30, 2022
@olanti-p olanti-p deleted the fix-msvc-warnings branch November 27, 2022 18:35
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.

3 participants