Added inline and constexpr when possible
This commit is contained in:
@ -16,13 +16,13 @@ namespace asp {
|
||||
std::string format_byte_size(uint64_t) noexcept;
|
||||
std::string format_time(const uint64_t) noexcept;
|
||||
std::string format_time_ns(uint64_t) noexcept;
|
||||
void toolbox_unit_test() noexcept;
|
||||
void toolbox_unit_test(void) noexcept;
|
||||
std::string thousand_sep(const uint64_t&, const char&) noexcept;
|
||||
std::string thousand_sep(const uint64_t&) noexcept;
|
||||
void print_separator(const char*) noexcept;
|
||||
void print_separator(const char* const) noexcept;
|
||||
|
||||
template <typename F, typename... Args>
|
||||
void measure_time_void(const char* step_name, const F& fnc, Args &&...args) noexcept {
|
||||
inline constexpr void measure_time_void(const char* step_name, const F& fnc, Args &&...args) noexcept {
|
||||
#ifndef __DEBUG
|
||||
printf("| %-" STR(W_NAME) "s | %" STR(W_TIME) "s | %-" STR(W_FTIME) "s |\r", step_name, "In progress", "In progress");
|
||||
#endif
|
||||
@ -33,7 +33,7 @@ namespace asp {
|
||||
}
|
||||
|
||||
template <typename T, typename F, typename... Args>
|
||||
T measure_time(const char* step_name, const F& fnc, Args &&...args) noexcept {
|
||||
inline constexpr T measure_time(const char* step_name, const F& fnc, Args &&...args) noexcept {
|
||||
#ifndef __DEBUG
|
||||
printf("| %-" STR(W_NAME) "s | %" STR(W_TIME) "s | %-" STR(W_FTIME) "s |\r", step_name, "In progress", "In progress");
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user