mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-26 20:47:05 +08:00
Workaround Windows.h breaking the Color::RGB function (#70)
wingdi.h (included via Windows.h) defines an RGB macro that breaks things. If a user really wants that macro in the same file as FTXUI they can move the Windows.h include to after the inclusion of FTXUI's headers.
This commit is contained in:
parent
d0eab41344
commit
0a9a72cbaa
@ -4,6 +4,12 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#ifdef RGB
|
||||||
|
// Workaround for wingdi.h (via Windows.h) defining macros that break things.
|
||||||
|
// https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-rgb
|
||||||
|
#undef RGB
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace ftxui {
|
namespace ftxui {
|
||||||
|
|
||||||
/// @brief A class representing terminal colors.
|
/// @brief A class representing terminal colors.
|
||||||
|
Loading…
Reference in New Issue
Block a user