From: Joel Rosdahl Date: Sun, 11 Feb 2024 11:07:27 +0000 (+0100) Subject: chore: Use brace initialization for integer literals X-Git-Tag: v4.10~97 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbe8d0d6d1ea16a06653af8558eb058d296ffa73;p=thirdparty%2Fccache.git chore: Use brace initialization for integer literals --- diff --git a/src/util/TextTable.cpp b/src/util/TextTable.cpp index e2e24f70..58d01a63 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 3aea7ab4..f2f2a798 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