Warn against Microsoft <windows.h> min and max macro (#1084)

Warn users they have defined the min/max macros which is not 
compatible with other code from the standard library or FTXUI.

Co-authored-by: Sylko Olzscher <sylko.olzscher@solostec.ch>
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
Sylko Olzscher
2025-08-17 11:18:25 +02:00
committed by GitHub
parent 8ef18ab647
commit 40e1fac3d4
34 changed files with 141 additions and 87 deletions

View File

@@ -1,11 +1,11 @@
// Copyright 2020 Arthur Sonzogni. All rights reserved.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.
#include <stddef.h> // for size_t
#include <array> // for array
#include <atomic> // for atomic
#include <chrono> // for operator""s, chrono_literals
#include <cmath> // for sin
#include <stddef.h> // for size_t
#include <array> // for array
#include <atomic> // for atomic
#include <chrono> // for operator""s, chrono_literals
#include <cmath> // for sin
#include <ftxui/component/loop.hpp>
#include <functional> // for ref, reference_wrapper, function
#include <memory> // for allocator, shared_ptr, __shared_ptr_access
@@ -514,7 +514,7 @@ int main() {
});
Loop loop(&screen, main_renderer);
while(!loop.HasQuitted()) {
while (!loop.HasQuitted()) {
// Update the state of the application.
shift++;
@@ -525,7 +525,7 @@ int main() {
loop.RunOnce();
// Sleep for a short duration to control the frame rate (60 FPS).
std::this_thread::sleep_for(std::chrono::milliseconds(1000/60));
std::this_thread::sleep_for(std::chrono::milliseconds(1000 / 60));
}
return 0;