llnl / llnl/SAMRAI

hier::Patch should return shared_ptr by const reference

Open
#43 2 comments 0 reactions 2 assignees View on GitHub

@nselliott is already working on this.

Since Oct 18, 2018.

Dominant language
C++
Stars
250
Forks
89
Avg merge
34m
Merged PRs (30d)
1

Description

Is there any reason why hier::Patch does return its class member of type std::shared_ptr's by value instead of by reference to const std::shared_ptr? Each time I want to access the hier::PatchGeometry or hier::PatchData members I have to take a lock to increase the reference count of std::shared_ptr. Returning references instead would allow having the freedom to decide for myself if I want to do this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.