Skip to content

Add .clang-tidy and other quality improvements - #75

Merged
jcmosc merged 14 commits into
mainfrom
cpp-quality-review-3f29968f
Oct 8, 2026
Merged

jcmosc merged 14 commits into
mainfrom
cpp-quality-review-3f29968f

Conversation

@jcmosc

@jcmosc jcmosc commented Oct 8, 2026

Copy link
Copy Markdown
Owner

No description provided.

jcmosc and others added 14 commits October 8, 2026 16:52
Add explicit static_cast<uint64_t>() to multiplication operations
where the result is assigned to a 64-bit type but operands are 32-bit,
preventing potential overflow before widening.

Fixes clang-tidy bugprone-implicit-widening-of-multiplication-result

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Mark member functions as const where they only read member variables
without modifying them, improving const correctness throughout the
codebase.

Fixes clang-tidy readability-make-member-function-const

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use modern C++ nullptr instead of NULL or literal 0 when comparing
or assigning pointer values.

Fixes clang-tidy modernize-use-nullptr

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Functions defined in class bodies are implicitly inline, so the
explicit inline specifier is redundant.

Fixes clang-tidy readability-redundant-inline-specifier

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
In C++, empty parentheses already indicate no parameters, making
the explicit (void) parameter list redundant.

Fixes clang-tidy modernize-redundant-void-arg

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Top-level const on return types is ignored for non-reference/pointer
types and reduces readability without improving const correctness.

Fixes clang-tidy readability-const-return-type

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Make auto declarations more explicit by adding * or & qualifiers
when the deduced type is a pointer or reference, improving code
readability.

Fixes clang-tidy readability-qualified-auto

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Ensure parameter names match between function declarations in headers
and their definitions in source files.

Fixes clang-tidy readability-inconsistent-declaration-parameter-name

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
pthread_t is an integer type (unsigned long) on Linux, not a pointer,
so it cannot be initialized with nullptr. Use 0 instead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jcmosc
jcmosc merged commit 482d58c into main Oct 8, 2026
2 checks passed
@jcmosc
jcmosc deleted the cpp-quality-review-3f29968f branch October 8, 2026 17:08
@jcmosc
jcmosc restored the cpp-quality-review-3f29968f branch October 8, 2026 17:08
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.

1 participant