From 9c4fcbd05003fc4c46480cd697cdb24f0924482c Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Tue, 22 Oct 2024 19:22:39 +0900 Subject: [PATCH] Use std::max instead of conditional (#2562) Found via clang-tidy. --- test/write_multiblock.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/write_multiblock.cc b/test/write_multiblock.cc index 70c3d78..0bd0788 100644 --- a/test/write_multiblock.cc +++ b/test/write_multiblock.cc @@ -142,9 +142,7 @@ static bool parse_write_blocks(const char* pstr, wbpart_list_t& wbparts, off_t& std::cerr << "[ERROR] -p option parameter(" << pstr << ") is something wrong." << std::endl; return false; } - if(max_size < tmp_part.size){ - max_size = tmp_part.size; - } + max_size = std::max(max_size, tmp_part.size); wbparts.push_back(tmp_part); }else{ std::cerr << "[ERROR] -p option parameter(" << pstr << ") is something wrong." << std::endl;