diff --git a/cmake/ftxui_test.cmake b/cmake/ftxui_test.cmake index 1bb13c2..e4f83d5 100644 --- a/cmake/ftxui_test.cmake +++ b/cmake/ftxui_test.cmake @@ -1,7 +1,7 @@ enable_testing() set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -set(FETCHCONTENT_UPDATES_DISCONNECTED TRUE) +option(FETCHCONTENT_UPDATES_DISCONNECTED TRUE) include(FetchContent) FetchContent_Declare(googletest diff --git a/examples/dom/canvas.cpp b/examples/dom/canvas.cpp index 6e6f547..b99ec0a 100644 --- a/examples/dom/canvas.cpp +++ b/examples/dom/canvas.cpp @@ -30,7 +30,7 @@ int main(int argc, const char* argv[]) { // Plot a function: std::vector ys(100); for (int x = 0; x < 100; x++) - ys[x] = 80 + 20 * cos(x * 0.2); + ys[x] = int(80 + 20 * cos(x * 0.2)); for (int x = 0; x < 99; x++) c.DrawPointLine(x, ys[x], x + 1, ys[x + 1], Color::Red); diff --git a/examples/dom/color_info_sorted_2d.ipp b/examples/dom/color_info_sorted_2d.ipp index 8f2038f..9c62779 100644 --- a/examples/dom/color_info_sorted_2d.ipp +++ b/examples/dom/color_info_sorted_2d.ipp @@ -31,7 +31,7 @@ std::vector> ColorInfoSorted2D() { [](const ColorInfo& A, const ColorInfo& B) { return A.value < B.value; }); - for (size_t i = 0; i < column.size() - 1; ++i) { + for (int i = 0; i < int(column.size()) - 1; ++i) { int best_index = i + 1; int best_distance = 255 * 255 * 3; for (size_t j = i + 1; j < column.size(); ++j) { diff --git a/examples/dom/hflow.cpp b/examples/dom/hflow.cpp index 36eb576..a197f68 100644 --- a/examples/dom/hflow.cpp +++ b/examples/dom/hflow.cpp @@ -10,7 +10,7 @@ int main(int argc, const char* argv[]) { using namespace ftxui; - auto make_box = [](size_t dimx, size_t dimy) { + auto make_box = [](int dimx, int dimy) { std::string title = std::to_string(dimx) + "x" + std::to_string(dimy); return window(text(title) | hcenter | bold, text("content") | hcenter | dim) | diff --git a/examples/dom/package_manager.cpp b/examples/dom/package_manager.cpp index 8d5e831..20f4605 100644 --- a/examples/dom/package_manager.cpp +++ b/examples/dom/package_manager.cpp @@ -41,7 +41,7 @@ int main(int argc, const char* argv[]) { int remaining_threads = 12; - int nb_queued = remaining_tasks.size(); + int nb_queued = (int)remaining_tasks.size(); int nb_active = 0; int nb_done = 0; diff --git a/examples/dom/vflow.cpp b/examples/dom/vflow.cpp index 30c910a..e66a261 100644 --- a/examples/dom/vflow.cpp +++ b/examples/dom/vflow.cpp @@ -10,7 +10,7 @@ int main(int argc, const char* argv[]) { using namespace ftxui; - auto make_box = [](size_t dimx, size_t dimy) { + auto make_box = [](int dimx, int dimy) { std::string title = std::to_string(dimx) + "x" + std::to_string(dimy); return window(text(title) | hcenter | bold, text("content") | hcenter | dim) |