Skip to content

Commit

Permalink
Fix code formatting in dateutil
Browse files Browse the repository at this point in the history
  • Loading branch information
rikyoz committed Jun 25, 2024
1 parent 8d75f7b commit 77d3a1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/internal/dateutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ auto FILETIME_to_file_time_type( FILETIME fileTime ) -> fs::file_time_type {
#endif
}

auto time_to_FILETIME( std::time_t timeValue ) -> FILETIME {
auto time_to_FILETIME( std::time_t value ) -> FILETIME {
// NOLINTNEXTLINE(*-magic-numbers)
const uint64_t timeInSeconds = ( static_cast< uint64_t >( timeValue ) * 10000000ull ) + 116444736000000000;
const std::uint64_t timeInSeconds = ( static_cast< std::uint64_t >( value ) * 10000000ull ) + 116444736000000000ull;
FILETIME fileTime{};
fileTime.dwLowDateTime = static_cast< DWORD >( timeInSeconds );
fileTime.dwHighDateTime = static_cast< DWORD >( timeInSeconds >> 32 );
fileTime.dwHighDateTime = static_cast< DWORD >( timeInSeconds >> 32ull );
return fileTime;
}

#endif

auto FILETIME_to_time_type( FILETIME fileTime ) -> time_type {
const FileTimeDuration fileTimeDuration{
( static_cast< int64_t >( fileTime.dwHighDateTime ) << 32 ) + fileTime.dwLowDateTime
( static_cast< std::uint64_t >( fileTime.dwHighDateTime ) << 32ull ) + fileTime.dwLowDateTime
};

const auto unixEpoch = fileTimeDuration + nt_to_unix_epoch;
Expand Down
2 changes: 1 addition & 1 deletion src/internal/dateutil.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace bit7z {

auto FILETIME_to_file_time_type( FILETIME fileTime ) -> fs::file_time_type;

auto time_to_FILETIME( std::time_t timeValue ) -> FILETIME;
auto time_to_FILETIME( std::time_t value ) -> FILETIME;

#endif

Expand Down

0 comments on commit 77d3a1d

Please sign in to comment.