Skip to content

Commit

Permalink
IOSS: Use std::max intead of if test
Browse files Browse the repository at this point in the history
  • Loading branch information
gdsjaar committed Nov 4, 2024
1 parent 47620c1 commit 20ec365
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/seacas/libraries/ioss/src/Ioss_Utils.C
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 20ec365

Please sign in to comment.