Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix dangling-reference warnings for particle functions. (AMReX-Codes#…
…4241) ## Summary With gcc 13.2 and all warnings/errors turned on, some particle functions generate a dangling-reference error. This PR fixes those errors. ## Additional background To reproduce, in `Tests/Particles/ParticleMesh/main.cpp` add lines 149-150: ``` myPC.IncrementWithTotal(acceleration , 0); myPC.SortParticlesForDeposition({0,0,0}); ``` and in `Tests/Particles/ParticleMesh/GNUmakefile` add a final line: ``` CXXFLAGS += -Werror -Wall -Wextra ``` Similar lines in: `./Src/Extern/SENSEI/AMReX_ParticleDataAdaptorI.H` may also have the same error, but I don't have SENSEI installed to check. ## Checklist The proposed changes: - [x] fix a bug or incorrect behavior in AMReX - [ ] add new capabilities to AMReX - [ ] changes answers in the test suite to more than roundoff level - [ ] are likely to significantly affect the results of downstream AMReX users - [ ] include documentation in the code and/or rst files, if appropriate
- Loading branch information