mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-11-09 22:30:07 +00:00
refactor: remove nocolor:: operations
since color can be on-off at runtime
This commit is contained in:
parent
bbe33e87d9
commit
571baa2c26
@ -57,28 +57,8 @@ inline std::ostream& white (std::ostream& os)
|
||||
{if(os.iword(detail::colorize_index()) == 1) {os << "\033[37m";} return os;}
|
||||
} // color_ansi
|
||||
|
||||
// do nothing.
|
||||
namespace nocolor
|
||||
{
|
||||
inline std::ostream& colorize (std::ostream& os) noexcept {return os;}
|
||||
inline std::ostream& nocolorize(std::ostream& os) noexcept {return os;}
|
||||
inline std::ostream& reset (std::ostream& os) noexcept {return os;}
|
||||
inline std::ostream& bold (std::ostream& os) noexcept {return os;}
|
||||
inline std::ostream& grey (std::ostream& os) noexcept {return os;}
|
||||
inline std::ostream& red (std::ostream& os) noexcept {return os;}
|
||||
inline std::ostream& green (std::ostream& os) noexcept {return os;}
|
||||
inline std::ostream& yellow (std::ostream& os) noexcept {return os;}
|
||||
inline std::ostream& blue (std::ostream& os) noexcept {return os;}
|
||||
inline std::ostream& magenta (std::ostream& os) noexcept {return os;}
|
||||
inline std::ostream& cyan (std::ostream& os) noexcept {return os;}
|
||||
inline std::ostream& white (std::ostream& os) noexcept {return os;}
|
||||
} // nocolor
|
||||
|
||||
#ifdef TOML11_COLORIZE_ERROR_MESSAGE
|
||||
// ANSI escape sequence is the only and default colorization method currently
|
||||
namespace color = color_ansi;
|
||||
#else
|
||||
namespace color = nocolor;
|
||||
#endif
|
||||
|
||||
} // toml
|
||||
#endif// TOML11_COLOR_HPP
|
||||
|
Loading…
Reference in New Issue
Block a user