Skip to content

Cpp quality review 3f29968f - #76

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

jcmosc merged 12 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 12 commits October 8, 2026 19:54
When override is specified, the virtual keyword is redundant since
override already implies the function is overriding a virtual base
class method.

Fixes clang-tidy modernize-use-override

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use *ptr instead of *ptr.get() since the smart pointer's dereference
operator already returns a reference to the underlying object.

Fixes clang-tidy readability-redundant-smartptr-get

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace `x ? true : false` with `x != 0`
- Replace `== false` with `!`
- Replace `if (x) return true; return false;` with `return x;`

Fixes clang-tidy readability-simplify-boolean-expr

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove explicit casts to void* when the expression is already of
type void*.

Fixes clang-tidy readability-redundant-casting

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove unnecessary parentheses in C-style casts where the expression
being cast doesn't require grouping.

Fixes clang-tidy readability-redundant-parentheses

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use Class::member instead of instance.member for static member access
to make it clear the member is static.

Fixes clang-tidy readability-static-accessed-through-instance

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Using empty() is more idiomatic and can be more efficient than
comparing size() to zero.

Fixes clang-tidy readability-container-size-empty

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace manual if-then-assign patterns with std::min and std::max
for clearer intent and potentially better optimization.

Fixes clang-tidy readability-use-std-min-max

🤖 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>
- Remove return statement from void function (IAGGraph.cpp)
- Split multiple declarations into separate statements (Graph.cpp)
- Fix inconsistent parameter name in declaration (Heap.h)
- Add parentheses to clarify operator precedence (HashTable.cpp)
- Fix integer division in floating point context (Time.cpp)
- Add missing default case to switch statement (Metadata.cpp)

Fixes clang-tidy readability-avoid-return-with-void-value,
readability-isolate-declaration, readability-inconsistent-declaration-parameter-name,
readability-math-missing-parentheses, bugprone-integer-division,
bugprone-switch-missing-default-case

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add NOLINT comments to suppress clang-tidy warnings for:
- Boolean expressions with intentional side effects
- Placeholder conditionals for future diagnostics
- Storage-only static variables constructed via placement new
- ObjC interop casts requiring void* intermediate

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jcmosc
jcmosc force-pushed the cpp-quality-review-3f29968f branch from c3cc1be to 4f1bfc2 Compare October 8, 2026 17:55
@jcmosc
jcmosc merged commit 58f41a5 into main Oct 8, 2026
2 checks passed
@jcmosc
jcmosc deleted the cpp-quality-review-3f29968f branch October 8, 2026 18:03
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