Bundles the 2026-07-12 code-audit session (Clusters A/B/C/D partial/E/F): denormalized Post/Advertisement reaction/comment/repost counters synced transactionally instead of live _count queries; real cursor-based pagination for followers/following/blocks lists; assertPetOwnership + formatRelativeTime centralized; dead r2.ts + AWS SDK deps removed; missing DB indexes added; account-deletion flow, mention notifications, pull-to-refresh feed, and mobile UI/i18n fixes from the surrounding sessions. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1.2 KiB
1.2 KiB
paths
| paths | |||||||
|---|---|---|---|---|---|---|---|
|
C++ Coding Style
This file extends common/coding-style.md with C++ specific content.
Modern C++ (C++17/20/23)
- Prefer modern C++ features over C-style constructs
- Use
autowhen the type is obvious from context - Use
constexprfor compile-time constants - Use structured bindings:
auto [key, value] = map_entry;
Resource Management
- RAII everywhere — no manual
new/delete - Use
std::unique_ptrfor exclusive ownership - Use
std::shared_ptronly when shared ownership is truly needed - Use
std::make_unique/std::make_sharedover rawnew
Naming Conventions
- Types/Classes:
PascalCase - Functions/Methods:
snake_caseorcamelCase(follow project convention) - Constants:
kPascalCaseorUPPER_SNAKE_CASE - Namespaces:
lowercase - Member variables:
snake_case_(trailing underscore) orm_prefix
Formatting
- Use clang-format — no style debates
- Run
clang-format -i <file>before committing
Reference
See skill: cpp-coding-standards for comprehensive C++ coding standards and guidelines.