diff options
author | crupest <crupest@outlook.com> | 2018-09-19 01:15:01 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-09-19 01:15:01 +0800 |
commit | 85bb4d466efeb2540363065d7c0987a9d60f70e9 (patch) | |
tree | ea5e5aa738afb37a2d3bc4e74f9be64c15f3d188 /CruUI/debug_base.h | |
parent | 4710715102df3806479985679bd8048631ccaab5 (diff) | |
download | cru-85bb4d466efeb2540363065d7c0987a9d60f70e9.tar.gz cru-85bb4d466efeb2540363065d7c0987a9d60f70e9.tar.bz2 cru-85bb4d466efeb2540363065d7c0987a9d60f70e9.zip |
finish animation!!!
Diffstat (limited to 'CruUI/debug_base.h')
-rw-r--r-- | CruUI/debug_base.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/CruUI/debug_base.h b/CruUI/debug_base.h index f78decbd..7669b9df 100644 --- a/CruUI/debug_base.h +++ b/CruUI/debug_base.h @@ -2,8 +2,8 @@ #include "system_headers.h" -#include <type_traits> #include <chrono> +#include <string_view> #include <fmt/format.h> #include "base.h" @@ -11,7 +11,7 @@ namespace cru::debug { #ifdef CRU_DEBUG - inline void DebugTime(Function<void()>&& action, const wchar_t* const hint_message) + inline void DebugTime(Function<void()>&& action, const StringView& hint_message) { const auto before = std::chrono::steady_clock::now(); action(); @@ -21,7 +21,7 @@ namespace cru::debug } template<typename TReturn> - TReturn DebugTime(Function<TReturn()>&& action, const wchar_t* const hint_message) + TReturn DebugTime(Function<TReturn()>&& action, const StringView& hint_message) { const auto before = std::chrono::steady_clock::now(); auto&& result = action(); @@ -31,13 +31,13 @@ namespace cru::debug return std::move(result); } #else - inline void DebugTime(Function<void()>&& action, const wchar_t* const hint_message) + inline void DebugTime(Function<void()>&& action, const StringView& hint_message) { action(); } template<typename TReturn> - TReturn DebugTime(Function<TReturn()>&& action, const wchar_t* const hint_message) + TReturn DebugTime(Function<TReturn()>&& action, const StringView& hint_message) { return action(); } |