mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 17:30:05 +00:00
Archive warnings clang-tidy fixes
This commit is contained in:
parent
8cdd8526eb
commit
81f09e07f0
14 changed files with 43 additions and 46 deletions
|
|
@ -21,9 +21,7 @@
|
|||
# include <date/date.h>
|
||||
#endif
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace util
|
||||
namespace scwx::util
|
||||
{
|
||||
|
||||
static const std::string logPrefix_ = "scwx::util::time";
|
||||
|
|
@ -48,6 +46,7 @@ std::chrono::system_clock::time_point TimePoint(uint32_t modifiedJulianDate,
|
|||
using sys_days = time_point<system_clock, days>;
|
||||
constexpr auto epoch = sys_days {1969y / December / 31d};
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers): literals are used
|
||||
return epoch + (modifiedJulianDate * 24h) +
|
||||
std::chrono::milliseconds {milliseconds};
|
||||
}
|
||||
|
|
@ -154,5 +153,4 @@ template std::optional<std::chrono::sys_time<std::chrono::seconds>>
|
|||
TryParseDateTime<std::chrono::seconds>(const std::string& dateTimeFormat,
|
||||
const std::string& str);
|
||||
|
||||
} // namespace util
|
||||
} // namespace scwx
|
||||
} // namespace scwx::util
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue