diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f6df61b120995f27647278b342cf22ed8c7ff52..c6003d51db98cdced0fe8f19fcf50fffe3b0ca29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ endif() # enable warnings and disallow non-standard language set(CMAKE_CXX_FLAGS "-Wall -pedantic -Wextra -Wno-ignored-qualifiers") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -O0 -g") -set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O2") +set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -O0") # clang produces a lot of unecessary warnings without this: add_compile_options("$<$<CXX_COMPILER_ID:Clang>:-Wno-nonportable-include-path>") diff --git a/Framework/Cascade/Cascade.h b/Framework/Cascade/Cascade.h index 6aed37d644b868c1ed92d5ce87475db45245225f..febd6836e93e9a36e1ee06575b97103b79ac2f7e 100644 --- a/Framework/Cascade/Cascade.h +++ b/Framework/Cascade/Cascade.h @@ -47,7 +47,7 @@ namespace corsika::cascade { void Run() { while (!fStack.IsEmpty()) { while (!fStack.IsEmpty()) { - Particle& pNext = *fStack.GetNextParticle(); + Particle pNext = *fStack.GetNextParticle(); Step(pNext); } // do cascade equations, which can put new particles on Stack,