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

@@ -32,10 +32,12 @@ int main() {
// Plot a function:
std::vector<int> ys(100);
for (int x = 0; x < 100; x++)
for (int x = 0; x < 100; x++) {
ys[x] = int(80 + 20 * cos(x * 0.2));
for (int x = 0; x < 99; x++)
}
for (int x = 0; x < 99; x++) {
c.DrawPointLine(x, ys[x], x + 1, ys[x + 1], Color::Red);
}
auto document = canvas(&c) | border;

View File

@@ -86,8 +86,9 @@ int main() {
auto render = [&]() {
std::vector<Element> entries;
for (auto& task : displayed_task)
for (auto& task : displayed_task) {
entries.push_back(renderTask(task));
}
return vbox({
// List of tasks.
@@ -138,8 +139,9 @@ int main() {
std::this_thread::sleep_for(0.01s);
// Exit
if (nb_active + nb_queued == 0)
if (nb_active + nb_queued == 0) {
break;
}
// Update the model for the next frame.
updateModel();

View File

@@ -21,8 +21,9 @@ int main() {
for (int index = 0; index < 200; ++index) {
std::vector<Element> entries;
for (int i = 0; i < 23; ++i) {
if (i != 0)
if (i != 0) {
entries.push_back(separator());
}
entries.push_back( //
hbox({
text(std::to_string(i)) | size(WIDTH, EQUAL, 2),