Skip to content

Commit

Permalink
🧹 use inline constexpr in headers instead of static constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
vnepogodin committed Jul 1, 2024
1 parent fc2c8ff commit 4a737fd
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/definitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@
#include <fmt/core.h>
#include <spdlog/spdlog.h>

static constexpr auto RESET = "\033[0m";
static constexpr auto BLACK = "\033[30m"; /* Black */
static constexpr auto RED = "\033[31m"; /* Red */
static constexpr auto GREEN = "\033[32m"; /* Green */
static constexpr auto YELLOW = "\033[33m"; /* Yellow */
static constexpr auto BLUE = "\033[34m"; /* Blue */
static constexpr auto MAGENTA = "\033[35m"; /* Magenta */
static constexpr auto CYAN = "\033[36m"; /* Cyan */
static constexpr auto WHITE = "\033[37m"; /* White */
static constexpr auto BOLDBLACK = "\033[1m\033[30m"; /* Bold Black */
static constexpr auto BOLDRED = "\033[1m\033[31m"; /* Bold Red */
static constexpr auto BOLDGREEN = "\033[1m\033[32m"; /* Bold Green */
static constexpr auto BOLDYELLOW = "\033[1m\033[33m"; /* Bold Yellow */
static constexpr auto BOLDBLUE = "\033[1m\033[34m"; /* Bold Blue */
static constexpr auto BOLDMAGENTA = "\033[1m\033[35m"; /* Bold Magenta */
static constexpr auto BOLDCYAN = "\033[1m\033[36m"; /* Bold Cyan */
static constexpr auto BOLDWHITE = "\033[1m\033[37m"; /* Bold White */
inline constexpr auto RESET = "\033[0m";
inline constexpr auto BLACK = "\033[30m"; /* Black */
inline constexpr auto RED = "\033[31m"; /* Red */
inline constexpr auto GREEN = "\033[32m"; /* Green */
inline constexpr auto YELLOW = "\033[33m"; /* Yellow */
inline constexpr auto BLUE = "\033[34m"; /* Blue */
inline constexpr auto MAGENTA = "\033[35m"; /* Magenta */
inline constexpr auto CYAN = "\033[36m"; /* Cyan */
inline constexpr auto WHITE = "\033[37m"; /* White */
inline constexpr auto BOLDBLACK = "\033[1m\033[30m"; /* Bold Black */
inline constexpr auto BOLDRED = "\033[1m\033[31m"; /* Bold Red */
inline constexpr auto BOLDGREEN = "\033[1m\033[32m"; /* Bold Green */
inline constexpr auto BOLDYELLOW = "\033[1m\033[33m"; /* Bold Yellow */
inline constexpr auto BOLDBLUE = "\033[1m\033[34m"; /* Bold Blue */
inline constexpr auto BOLDMAGENTA = "\033[1m\033[35m"; /* Bold Magenta */
inline constexpr auto BOLDCYAN = "\033[1m\033[36m"; /* Bold Cyan */
inline constexpr auto BOLDWHITE = "\033[1m\033[37m"; /* Bold White */

#define output_inter(...) fmt::print(__VA_ARGS__)

Check failure on line 28 in src/definitions.hpp

View workflow job for this annotation

GitHub Actions / cpp-linter

/src/definitions.hpp:28:9 [cppcoreguidelines-macro-usage

variadic macro 'output_inter' used; consider using a 'constexpr' variadic template function
#define error_inter(...) fmt::print(stderr, fmt::fg(fmt::color::red), __VA_ARGS__)

Check failure on line 29 in src/definitions.hpp

View workflow job for this annotation

GitHub Actions / cpp-linter

/src/definitions.hpp:29:9 [cppcoreguidelines-macro-usage

variadic macro 'error_inter' used; consider using a 'constexpr' variadic template function
Expand Down

0 comments on commit 4a737fd

Please sign in to comment.