From a054488f8417a40e22c4e1e0f9738f705785aa9e Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Tue, 8 Oct 2024 10:58:25 +0200 Subject: Name type template parameters using CamelCase. --- src/buildtool/system/system.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/buildtool/system/system.hpp') diff --git a/src/buildtool/system/system.hpp b/src/buildtool/system/system.hpp index 06b45d79..5077351e 100644 --- a/src/buildtool/system/system.hpp +++ b/src/buildtool/system/system.hpp @@ -26,19 +26,19 @@ void ExitWithoutCleanup(int exit_code); /// \brief Obtain POSIX epoch time for a given clock. /// Clocks may have different epoch times. To obtain the POSIX epoch time /// (1970-01-01 00:00:00 UTC) for a given clock, it must be converted. -template -static auto GetPosixEpoch() -> std::chrono::time_point { +template +static auto GetPosixEpoch() -> std::chrono::time_point { // Since C++20, the system clock's default value is the POSIX epoch time. std::chrono::time_point sys_epoch{}; - if constexpr (std::is_same_v) { + if constexpr (std::is_same_v) { // No conversion necessary for the system clock. return sys_epoch; } - else if constexpr (ClockHasFromSys) { + else if constexpr (ClockHasFromSys) { // The correct C++20 way to perform the time point conversion. - return T_Clock::from_sys(sys_epoch); + return TClock::from_sys(sys_epoch); } - else if constexpr (ClockHasFromTime) { + else if constexpr (ClockHasFromTime) { // Older releases of libcxx did not implement the standard conversion // function from_sys() for std::chrono::file_clock. Instead the // non-standard function file_clock::from_time_t() must be used. Since @@ -46,11 +46,11 @@ static auto GetPosixEpoch() -> std::chrono::time_point { // - https://reviews.llvm.org/D113027 // - https://reviews.llvm.org/D113430 // TODO(modernize): remove this once we require clang version >= 14.0.0 - return T_Clock::from_time_t( + return TClock::from_time_t( std::chrono::system_clock::to_time_t(sys_epoch)); } - static_assert(std::is_same_v or - ClockHasFromSys or ClockHasFromTime, + static_assert(std::is_same_v or + ClockHasFromSys or ClockHasFromTime, "Time point conversion function unavailable."); return {}; } -- cgit v1.2.3