From 7b80562fce5fc1b606793cecc951b0dd7e2a109f Mon Sep 17 00:00:00 2001 From: Bart Joy Date: Tue, 13 Nov 2018 19:29:02 +1300 Subject: [PATCH] Use Windows enum instead of magic number Use the named value from Windows.h rather than the equivalent magic number. Source: https://docs.microsoft.com/en-us/windows/console/setconsolemode --- sqlgrep/sqlgrep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlgrep/sqlgrep.cpp b/sqlgrep/sqlgrep.cpp index 07893cc..96fbfd1 100644 --- a/sqlgrep/sqlgrep.cpp +++ b/sqlgrep/sqlgrep.cpp @@ -180,7 +180,7 @@ void configure_console_for_ansi_escape_sequences() auto const console_window = GetStdHandle(STD_OUTPUT_HANDLE); DWORD startup_console_mode; GetConsoleMode(console_window, &startup_console_mode); - SetConsoleMode(console_window, startup_console_mode | 0x0004); + SetConsoleMode(console_window, startup_console_mode | ENABLE_VIRTUAL_TERMINAL_PROCESSING); } int main(int argc, char** argv)