Skip to content
Snippets Groups Projects
Verified Commit 300ead2c authored by Timm Fitschen's avatar Timm Fitschen
Browse files

REVERT: revert unnecessary changes

parent 1e9eaa5c
Branches
Tags
1 merge request!25F cpp to string
Pipeline #13920 passed
Pipeline: caosdb-cppinttest

#13921

    ...@@ -203,20 +203,21 @@ protected: ...@@ -203,20 +203,21 @@ protected:
    */ */
    inline auto Remove(int index) -> void { inline auto Remove(int index) -> void {
    this->wrapped->DeleteSubrange(index, 1); this->wrapped->DeleteSubrange(index, 1);
    cache.clear(); if (cache.count(index) > 0) {
    // if (cache.count(index) > 0) { cache.erase(index);
    // cache.erase(index); }
    //}
    // shift all indices in the cache above index (such that the values do not
    //// shift all indices in the cache above index (such that the values do not // get deleted/copied because this could destroy pointers (c-interface).
    //// get deleted/copied because this could destroy pointers (c-interface). for (int i = index + 1; i < size(); i++) {
    // for (int i = index + 1; i < size(); i++) { if (cache.count(i) > 0) {
    // if (cache.count(i) > 0) { auto handle = cache.extract(i);
    // auto handle = cache.extract(i); handle.key()--;
    // handle.key()--; cache.insert(std::move(handle));
    // cache.insert(std::move(handle)); }
    //} }
    //} // this is possible because cache is an ordered map
    cache.erase(cache.find(size()), cache.end());
    } }
    inline auto Clear() noexcept -> void { this->wrapped->Clear(); } inline auto Clear() noexcept -> void { this->wrapped->Clear(); }
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment