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

Silence a clang tidy readability warning. #42294

Merged
merged 1 commit into from
Jul 20, 2020

Conversation

kevingranade
Copy link
Member

@kevingranade kevingranade commented Jul 20, 2020

Summary

SUMMARY: None

Purpose of change

Clang tidy is complaining.

/home/runner/work/Cataclysm-DDA/Cataclysm-DDA/src/npc.cpp:1590:20: error: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr,-warnings-as-errors]
            return false;
~~~~~~~~~~~~~~~~~~~^~~~~~

In english, having a conditional to select between true and false is poor for readability.

Describe the solution

Refactor to try to make it slightly more readable and make clang happy.

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Code: Build Issues regarding different builds and build environments labels Jul 20, 2020
@ZhilkinSerg ZhilkinSerg merged commit f8bb2f6 into CleverRaven:master Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Build Issues regarding different builds and build environments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants