mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-30 10:47:35 +02:00
Use FMT_THROW
in fmt/color.h.
This allows fmt to be compiled with `-fno-exceptions`.
This commit is contained in:
committed by
Victor Zverovich
parent
d561cb47a7
commit
41076d1de3
@ -237,7 +237,7 @@ class text_style {
|
|||||||
foreground_color = rhs.foreground_color;
|
foreground_color = rhs.foreground_color;
|
||||||
} else if (rhs.set_foreground_color) {
|
} else if (rhs.set_foreground_color) {
|
||||||
if (!foreground_color.is_rgb || !rhs.foreground_color.is_rgb)
|
if (!foreground_color.is_rgb || !rhs.foreground_color.is_rgb)
|
||||||
throw format_error("can't OR a terminal color");
|
FMT_THROW(format_error("can't OR a terminal color"));
|
||||||
foreground_color.value.rgb_color |= rhs.foreground_color.value.rgb_color;
|
foreground_color.value.rgb_color |= rhs.foreground_color.value.rgb_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ class text_style {
|
|||||||
background_color = rhs.background_color;
|
background_color = rhs.background_color;
|
||||||
} else if (rhs.set_background_color) {
|
} else if (rhs.set_background_color) {
|
||||||
if (!background_color.is_rgb || !rhs.background_color.is_rgb)
|
if (!background_color.is_rgb || !rhs.background_color.is_rgb)
|
||||||
throw format_error("can't OR a terminal color");
|
FMT_THROW(format_error("can't OR a terminal color"));
|
||||||
background_color.value.rgb_color |= rhs.background_color.value.rgb_color;
|
background_color.value.rgb_color |= rhs.background_color.value.rgb_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -266,7 +266,7 @@ class text_style {
|
|||||||
foreground_color = rhs.foreground_color;
|
foreground_color = rhs.foreground_color;
|
||||||
} else if (rhs.set_foreground_color) {
|
} else if (rhs.set_foreground_color) {
|
||||||
if (!foreground_color.is_rgb || !rhs.foreground_color.is_rgb)
|
if (!foreground_color.is_rgb || !rhs.foreground_color.is_rgb)
|
||||||
throw format_error("can't AND a terminal color");
|
FMT_THROW(format_error("can't AND a terminal color"));
|
||||||
foreground_color.value.rgb_color &= rhs.foreground_color.value.rgb_color;
|
foreground_color.value.rgb_color &= rhs.foreground_color.value.rgb_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -275,7 +275,7 @@ class text_style {
|
|||||||
background_color = rhs.background_color;
|
background_color = rhs.background_color;
|
||||||
} else if (rhs.set_background_color) {
|
} else if (rhs.set_background_color) {
|
||||||
if (!background_color.is_rgb || !rhs.background_color.is_rgb)
|
if (!background_color.is_rgb || !rhs.background_color.is_rgb)
|
||||||
throw format_error("can't AND a terminal color");
|
FMT_THROW(format_error("can't AND a terminal color"));
|
||||||
background_color.value.rgb_color &= rhs.background_color.value.rgb_color;
|
background_color.value.rgb_color &= rhs.background_color.value.rgb_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user