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

Clang-tidy readability-redundant-declarations #39702

Conversation

jbytheway
Copy link
Contributor

Summary

SUMMARY: None

Purpose of change

More static analysis.

This check looks for redundant declarations.

Describe the solution

Remove one redundant declaration.

Consolidate two declarations into one in a new place.

Testing

Unit tests only.

Additional context

Down to 32 clang-tidy checks to triage after this one.

Previously trigdist was declared in line.h and game.h but defined in
options.cpp.  Make it be declared in line.h and defined in line.cpp.
This is consistent, and it fixes a readability-redundant-declaration
warning from clang-tidy.
@jbytheway jbytheway force-pushed the clang_tidy_readability_redundant_declarations branch from 304f983 to 7e2b48e Compare April 19, 2020 01:19
@jbytheway
Copy link
Contributor Author

CI found an unrelated bugprone-integer-division issue. I've fixed that too.

@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Apr 19, 2020
@ZhilkinSerg ZhilkinSerg merged commit 9fe52e2 into CleverRaven:master Apr 19, 2020
@jbytheway jbytheway deleted the clang_tidy_readability_redundant_declarations branch April 19, 2020 13:41
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: Infrastructure / Style / Static Analysis Code internal infrastructure and style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants