cpp : Removed redundant keywords and replaced macros with constant expressions
This commit is contained in:
@@ -60,12 +60,15 @@ constexpr void header(const std::array<int32_t, N>& gaps, const std::array<const
|
||||
* @param gaps List of size gaps
|
||||
*/
|
||||
template<size_t N>
|
||||
constexpr inline void footer(const std::array<int32_t, N>& gaps) noexcept {
|
||||
constexpr void footer(const std::array<int32_t, N>& gaps) noexcept {
|
||||
formatted_line(gaps, "└", "┴", "─", "┘");
|
||||
}
|
||||
|
||||
#define duration_ns(a) std::chrono::duration_cast<std::chrono::nanoseconds>(a).count()
|
||||
#define perf_counter_ns() std::chrono::high_resolution_clock::now()
|
||||
template<typename T>
|
||||
constexpr int64_t duration_ns(const T& a) noexcept {
|
||||
return std::chrono::duration_cast<std::chrono::nanoseconds>(a).count();
|
||||
}
|
||||
constexpr auto perf_counter_ns = std::chrono::high_resolution_clock::now;
|
||||
|
||||
/**
|
||||
* @brief Format the time in seconds in human readable format.
|
||||
|
Reference in New Issue
Block a user