rippled
rippled copied to clipboard
Prevent unnecessary `shared_ptr` copies by accepting a value in `SHAMapInnerNode::setChild`
High Level Overview of Change
Because SHAMapInnerNode::setChild takes a shared_ptr const &, every node insertion requires a shared_ptr copy, which causes an increment/decrement of the refcount in the object. This PR makes SHAMapInnerNode::setChild take a value which is moved into place.
Context of Change
Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ x] Refactor (non-breaking change that only restructures code)
- [ ] Tests (You added tests for code that already exists, or your new feature included in this PR)
- [ ] Documentation Updates
- [ ] Release
This does not cause any functional change.