From 0cad8dccc4e557103d97403e116246666b3a39f3 Mon Sep 17 00:00:00 2001 From: Sam Reeve <6740307+streeve@users.noreply.github.com> Date: Fri, 10 Nov 2023 13:11:43 -0500 Subject: [PATCH] fixup: linked cell return warning --- core/src/Cabana_LinkedCellList.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/Cabana_LinkedCellList.hpp b/core/src/Cabana_LinkedCellList.hpp index eadc58061..7f98eb005 100644 --- a/core/src/Cabana_LinkedCellList.hpp +++ b/core/src/Cabana_LinkedCellList.hpp @@ -726,6 +726,7 @@ class NeighborList> for ( int k = kmin; k < kmax; ++k ) { total_count += list.binSize( i, j, k ); + // This neighbor is in this bin. if ( total_count > neighbor_index ) { int particle_id = list.binOffset( i, j, k ) + @@ -741,6 +742,11 @@ class NeighborList> } previous_count = total_count; } + + assert( total_count <= totalNeighbor( list ) ); + + // Should never make it to this point. + return 0; } };