From 3f5e1a5466d60054d3abb52e82eec53f19ed7bc6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 11 Dec 2024 11:48:46 -0500 Subject: Remove unnecessary null checks in test --- test/cpp/test_path_std.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/cpp/test_path_std.cpp b/test/cpp/test_path_std.cpp index 7b592d8..58e2a87 100644 --- a/test/cpp/test_path_std.cpp +++ b/test/cpp/test_path_std.cpp @@ -483,8 +483,11 @@ run() } for (const auto& relatives : lexical_relatives) { - const Path l = relatives.lhs ? Path{relatives.lhs} : Path{}; - const Path r = relatives.rhs ? Path{relatives.rhs} : Path{}; + assert(relatives.lhs); + assert(relatives.rhs); + + const Path l = Path{relatives.lhs}; + const Path r = Path{relatives.rhs}; assert(match( l.lexically_relative(r), -- cgit v1.2.1