From 20ec3650c4e232018858bfd34afc458567c37ea7 Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Mon, 4 Nov 2024 16:53:35 -0700 Subject: [PATCH] IOSS: Use std::max intead of if test --- packages/seacas/libraries/ioss/src/Ioss_Utils.C | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/seacas/libraries/ioss/src/Ioss_Utils.C b/packages/seacas/libraries/ioss/src/Ioss_Utils.C index 2e2257fd7b..5bf67a3535 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Utils.C +++ b/packages/seacas/libraries/ioss/src/Ioss_Utils.C @@ -838,9 +838,7 @@ bool Ioss::Utils::check_int_to_real_overflow(const Ioss::Field &field, int64_t * std::string Ioss::Utils::platform_information() { #if !defined(__IOSS_WINDOWS__) - struct utsname sys_info - { - }; + struct utsname sys_info{}; uname(&sys_info); std::string info = fmt::format("Node: {0}, OS: {1} {2}, {3}, Machine: {4}", sys_info.nodename, sys_info.sysname, @@ -1364,7 +1362,7 @@ void Ioss::Utils::info_fields(const Ioss::GroupingEntity *ige, Ioss::Field::Role // Iterate through results fields. Get max width of a name... size_t max_width = 0; for (const auto &field_name : fields) { - max_width = max_width > field_name.length() ? max_width : field_name.length(); + max_width = std::max(max_width, field_name.length()); } size_t width = Ioss::Utils::term_width();