Skip to content

Conversation

gy-deng
Copy link
Contributor

@gy-deng gy-deng commented Aug 20, 2025

Remove unnecessary copies from PR #497

lib/NegativeAcksTracker.cc

    auto ledgerMap = it->second;
    for (auto ledgerIt = ledgerMap.begin(); ledgerIt != ledgerMap.end(); ++ledgerIt) {
        auto entrySet = ledgerIt->second;

This makes a copy. Is this intended to be a reference instead - auto& entrySet = ledgerIt->second;?
This line also makes a copy `auto ledgerMap = it->second;
Originally posted by @arhoads in #497 (comment)

Motivation

Modifications

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests.

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

@BewareMyPower BewareMyPower added the enhancement New feature or request label Aug 25, 2025
@BewareMyPower BewareMyPower added this to the 3.8.0 milestone Aug 25, 2025
@BewareMyPower BewareMyPower merged commit 5451797 into apache:main Aug 26, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants