This commit is contained in:
Mars 2024-07-01 05:25:27 -04:00
parent 4630150aff
commit 4f039f9c79
2 changed files with 5 additions and 4 deletions

View file

@ -15,7 +15,7 @@ constexpr u64 GIB = 1'073'741'824;
template <> template <>
struct fmt::formatter<BytesToGiB> : formatter<double> { struct fmt::formatter<BytesToGiB> : formatter<double> {
template <typename FmtCtx> template <typename FmtCtx>
fn format(const BytesToGiB BTG, FmtCtx& ctx)->typename FmtCtx::iterator { fn format(const BytesToGiB BTG, FmtCtx& ctx) -> typename FmtCtx::iterator {
typename FmtCtx::iterator out = typename FmtCtx::iterator out =
formatter<double>::format(static_cast<double>(BTG.value) / GIB, ctx); formatter<double>::format(static_cast<double>(BTG.value) / GIB, ctx);
*out++ = 'G'; *out++ = 'G';
@ -25,7 +25,7 @@ struct fmt::formatter<BytesToGiB> : formatter<double> {
} }
}; };
fn GetDate()->string { fn GetDate() -> string {
const std::tm localTime = fmt::localtime(time(nullptr)); const std::tm localTime = fmt::localtime(time(nullptr));
string date = fmt::format("{:%e}", localTime); string date = fmt::format("{:%e}", localTime);
@ -45,7 +45,7 @@ fn GetDate()->string {
return fmt::format("{:%B} {}, {:%-I:%0M %p}", localTime, date, localTime); return fmt::format("{:%B} {}, {:%-I:%0M %p}", localTime, date, localTime);
} }
fn main()->i32 { fn main() -> i32 {
using std::future; using std::future;
const Config config = Config::getInstance(); const Config config = Config::getInstance();

View file

@ -1,5 +1,6 @@
#include <exception>
#include <windows.h> #include <windows.h>
#include <winrt/Windows.Foundation.h> // ReSharper disable once CppUnusedIncludeDirective #include <winrt/Windows.Foundation.h>
#include <winrt/Windows.Media.Control.h> #include <winrt/Windows.Media.Control.h>
#include <winrt/base.h> #include <winrt/base.h>
#include <winrt/impl/Windows.Media.Control.2.h> #include <winrt/impl/Windows.Media.Control.2.h>