Skip to content

Complete BuffDetection pimpl pattern#34

Merged
7emotions merged 4 commits intobuff-devfrom
copilot/improve-buff-detection-impl
Mar 19, 2026
Merged

Complete BuffDetection pimpl pattern#34
7emotions merged 4 commits intobuff-devfrom
copilot/improve-buff-detection-impl

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 14, 2026

BuffDetection had the header declarations and internal Impl::buff_detect() logic but was missing the pimpl boilerplate that every other module implements.

  • Define BuffDetectionResult struct (wraps shared_ptr<RuneTracker>)
  • Add Impl::initialize() stub matching the public API contract
  • Add constructor, destructor, initialize() and auto_detect() wrappers

Pattern follows ArmorDetection and other modules:

BuffDetection::BuffDetection() noexcept
    : pimpl { std::make_unique<Impl>() } { }

BuffDetection::~BuffDetection() noexcept = default;

auto BuffDetection::auto_detect(const BuffDetectionFrame& frame) noexcept
    -> std::optional<BuffDetectionResult> {
    auto result = pimpl->buff_detect(frame);
    if (!result) {
        return std::nullopt;
    }
    return BuffDetectionResult { std::move(result) };
}

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Refactor BuffDetection implementation based on other modules Complete BuffDetection pimpl pattern Mar 14, 2026
Copilot AI requested a review from 7emotions March 14, 2026 01:53
@7emotions 7emotions marked this pull request as ready for review March 19, 2026 06:19
@7emotions 7emotions merged commit 5bd0406 into buff-dev Mar 19, 2026
1 check failed
@github-project-automation github-project-automation bot moved this from Todo to Done in RMCS Auto Aim V2 Mar 19, 2026
@7emotions 7emotions deleted the copilot/improve-buff-detection-impl branch March 19, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants