-
Notifications
You must be signed in to change notification settings - Fork 785
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix magic_enum compilation times (#4113)
- Loading branch information
1 parent
73d08dc
commit 49b8cce
Showing
5 changed files
with
28 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include <nano/lib/stats_enums.hpp> | ||
|
||
#define MAGIC_ENUM_RANGE_MIN 0 | ||
#define MAGIC_ENUM_RANGE_MAX 256 | ||
|
||
#include <magic_enum.hpp> | ||
|
||
std::string_view nano::to_string (nano::stat::type type) | ||
{ | ||
return magic_enum::enum_name (type); | ||
} | ||
|
||
std::string_view nano::to_string (nano::stat::detail detail) | ||
{ | ||
return magic_enum::enum_name (detail); | ||
} | ||
|
||
std::string_view nano::to_string (nano::stat::dir dir) | ||
{ | ||
return magic_enum::enum_name (dir); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters