Skip to content

Commit

Permalink
WarpX class: simplify return type of get_spectral_solver_fp using `au…
Browse files Browse the repository at this point in the history
…to&` (#5656)

This PR simplifies the return type of a method of the WarpX class by
replacing:
```
#   ifdef WARPX_DIM_RZ
        SpectralSolverRZ&
#   else
        SpectralSolver&
#   endif
```
with
```
auto&
```
  • Loading branch information
lucafedeli88 authored Feb 14, 2025
1 parent 7c9f8f2 commit 7e339a0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Source/WarpX.H
Original file line number Diff line number Diff line change
Expand Up @@ -1005,13 +1005,7 @@ public:
void PSATDSubtractCurrentPartialSumsAvg ();

#ifdef WARPX_USE_FFT

# ifdef WARPX_DIM_RZ
SpectralSolverRZ&
# else
SpectralSolver&
# endif
get_spectral_solver_fp (int lev) {return *spectral_solver_fp[lev];}
auto& get_spectral_solver_fp (int lev) {return *spectral_solver_fp[lev];}
#endif

FiniteDifferenceSolver * get_pointer_fdtd_solver_fp (int lev) { return m_fdtd_solver_fp[lev].get(); }
Expand Down

0 comments on commit 7e339a0

Please sign in to comment.