From dbe8d0d6d1ea16a06653af8558eb058d296ffa73 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 11 Feb 2024 12:07:27 +0100 Subject: [PATCH] chore: Use brace initialization for integer literals --- src/util/TextTable.cpp | 4 ++-- src/util/wincompat.hpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/util/TextTable.cpp b/src/util/TextTable.cpp index e2e24f70c..58d01a63b 100644 --- a/src/util/TextTable.cpp +++ b/src/util/TextTable.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2021-2023 Joel Rosdahl and other contributors +// Copyright (C) 2021-2024 Joel Rosdahl and other contributors // // See doc/AUTHORS.adoc for a complete list of contributors. // @@ -32,7 +32,7 @@ TextTable::add_heading(const std::string& text) Cell cell(text); cell.m_heading = true; m_rows.push_back({cell}); - m_columns = std::max(m_columns, size_t(1)); + m_columns = std::max(m_columns, size_t{1}); } void diff --git a/src/util/wincompat.hpp b/src/util/wincompat.hpp index 3aea7ab41..f2f2a7984 100644 --- a/src/util/wincompat.hpp +++ b/src/util/wincompat.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2021-2023 Joel Rosdahl and other contributors +// Copyright (C) 2021-2024 Joel Rosdahl and other contributors // // See doc/AUTHORS.adoc for a complete list of contributors. // @@ -29,8 +29,8 @@ // From: // http://mesos.apache.org/api/latest/c++/3rdparty_2stout_2include_2stout_2windows_8hpp_source.html # ifdef _MSC_VER -const mode_t S_IRUSR = mode_t(_S_IREAD); -const mode_t S_IWUSR = mode_t(_S_IWRITE); +const mode_t S_IRUSR = mode_t{_S_IREAD}; +const mode_t S_IWUSR = mode_t{_S_IWRITE}; # endif # ifndef S_IFIFO -- 2.47.2