| 44 | const SetOutputAttr SetOutputWhite{FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN}; |
| 45 | |
| 46 | struct EraseLineStruct |
| 47 | { |
| 48 | static void EraseLine() |
| 49 | { |
| 50 | HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE); |
| 51 | if (handle != INVALID_HANDLE_VALUE && handle != nullptr) |
| 52 | { |
| 53 | CONSOLE_SCREEN_BUFFER_INFO info; |
| 54 | if (GetConsoleScreenBufferInfo(handle, &info)) |
| 55 | { |
| 56 | info.dwCursorPosition.X = 0; |
| 57 | DWORD written; |
| 58 | SetConsoleCursorPosition(handle, info.dwCursorPosition); |
| 59 | FillConsoleOutputCharacterW(handle, L' ', info.dwMaximumWindowSize.X, info.dwCursorPosition, &written); |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | }; |
| 64 | |
| 65 | const EraseLineStruct EraseLine; |
| 66 |
nothing calls this directly
no outgoing calls
no test coverage detected