mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-11-09 22:30:07 +00:00
refactor: rename internal macro value
This commit is contained in:
parent
5c146857a3
commit
4688c235f5
@ -4,9 +4,9 @@
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef TOML11_COLORIZE_ERROR_MESSAGE
|
||||
#define TOML11_COLORED_MESSAGE_ACTIVATED true
|
||||
#define TOML11_ERROR_MESSAGE_COLORIZED true
|
||||
#else
|
||||
#define TOML11_COLORED_MESSAGE_ACTIVATED false
|
||||
#define TOML11_ERROR_MESSAGE_COLORIZED false
|
||||
#endif
|
||||
|
||||
namespace toml
|
||||
|
@ -420,7 +420,7 @@ struct region final : public region_base
|
||||
inline std::string format_underline(const std::string& message,
|
||||
const std::vector<std::pair<region_base const*, std::string>>& reg_com,
|
||||
const std::vector<std::string>& helps = {},
|
||||
const bool colorize = TOML11_COLORED_MESSAGE_ACTIVATED)
|
||||
const bool colorize = TOML11_ERROR_MESSAGE_COLORIZED)
|
||||
{
|
||||
assert(!reg_com.empty());
|
||||
|
||||
|
@ -1861,7 +1861,7 @@ template<typename C, template<typename ...> class T, template<typename ...> clas
|
||||
inline std::string format_error(const std::string& err_msg,
|
||||
const basic_value<C, T, A>& v, const std::string& comment,
|
||||
std::vector<std::string> hints = {},
|
||||
const bool colorize = TOML11_COLORED_MESSAGE_ACTIVATED)
|
||||
const bool colorize = TOML11_ERROR_MESSAGE_COLORIZED)
|
||||
{
|
||||
return detail::format_underline(err_msg,
|
||||
std::vector<std::pair<detail::region_base const*, std::string>>{
|
||||
@ -1874,7 +1874,7 @@ inline std::string format_error(const std::string& err_msg,
|
||||
const toml::basic_value<C, T, A>& v1, const std::string& comment1,
|
||||
const toml::basic_value<C, T, A>& v2, const std::string& comment2,
|
||||
std::vector<std::string> hints = {},
|
||||
const bool colorize = TOML11_COLORED_MESSAGE_ACTIVATED)
|
||||
const bool colorize = TOML11_ERROR_MESSAGE_COLORIZED)
|
||||
{
|
||||
return detail::format_underline(err_msg,
|
||||
std::vector<std::pair<detail::region_base const*, std::string>>{
|
||||
@ -1889,7 +1889,7 @@ inline std::string format_error(const std::string& err_msg,
|
||||
const toml::basic_value<C, T, A>& v2, const std::string& comment2,
|
||||
const toml::basic_value<C, T, A>& v3, const std::string& comment3,
|
||||
std::vector<std::string> hints = {},
|
||||
const bool colorize = TOML11_COLORED_MESSAGE_ACTIVATED)
|
||||
const bool colorize = TOML11_ERROR_MESSAGE_COLORIZED)
|
||||
{
|
||||
return detail::format_underline(err_msg,
|
||||
std::vector<std::pair<detail::region_base const*, std::string>>{
|
||||
|
Loading…
Reference in New Issue
Block a user