Skip to content

Commit 3a899d5

Browse files
committed
fix(tests): Fix additional narrowing conversions in sparse vector test
Add static_cast<size_t> to remaining integer-to-size_t conversions on lines 311 and 315 to ensure compatibility with strict clang compiler settings.
1 parent 00816b2 commit 3a899d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/unit/core/test_sparse_vector_neighbor_exchange.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,11 @@ TEST_CASE("Neighbor exchange - 2D grid pattern (4 processes)",
308308
int v_neighbor = vertical_neighbors[rank];
309309

310310
// Create data for each direction
311-
std::vector<size_t> h_indices = {rank * 10};
311+
std::vector<size_t> h_indices = {static_cast<size_t>(rank * 10)};
312312
std::vector<double> h_data = {static_cast<double>(rank * 100)};
313313
auto sparse_h = sparsevector::create<double>(h_indices, h_data);
314314

315-
std::vector<size_t> v_indices = {rank * 20};
315+
std::vector<size_t> v_indices = {static_cast<size_t>(rank * 20)};
316316
std::vector<double> v_data = {static_cast<double>(rank * 200)};
317317
auto sparse_v = sparsevector::create<double>(v_indices, v_data);
318318

0 commit comments

Comments
 (0)