Skip to content

Change DetectorSpecs singleton accessor to use pointer instead of reference. - #672

Closed
hgreenlee wants to merge 1 commit into
SBNSoftware:developfrom
hgreenlee:greenlee_dangling_reference
Closed

Change DetectorSpecs singleton accessor to use pointer instead of reference.#672
hgreenlee wants to merge 1 commit into
SBNSoftware:developfrom
hgreenlee:greenlee_dangling_reference

Conversation

@hgreenlee

Copy link
Copy Markdown
Contributor

Description

Change DetectorSpecs singleton accessor (DetectorSpecs::GetME()) to return a pointer instead of a reference. This avoids false positive dangling reference warning for base qualifier e28 / c++20 without pragmas or compiler options.

This is an interface change, but not a functional change. Code affected by the interface change is limited to sbncode package.

  • Have you added a label? (bug/enhancement/physics etc.)
  • Have you assigned at least 1 reviewer?
  • Is this PR related to an open issue / project?
  • Does this PR affect CAF data format? If so, please assign a CAF maintainer as additional reviewer. @Gianluca Petrillo and @thomas Jones
  • Does this PR require merging another PR in a different repository (such as sbnanobj/sbnobj etc.)? If so, please link it in the description.
  • Are you submitting this PR on behalf of someone else who made the code changes? If so, please mention them in the description.

@hgreenlee hgreenlee added the refactor Something needing refactoring label Sep 2, 2026
@hgreenlee

Copy link
Copy Markdown
Contributor Author

Will use a different solution.

@hgreenlee hgreenlee closed this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Something needing refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant