mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-23 03:10:01 +08:00
Fix windows warning. (#332)
This commit is contained in:
parent
8ba3698437
commit
62747a49b6
@ -1,7 +1,7 @@
|
|||||||
enable_testing()
|
enable_testing()
|
||||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
set(FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
|
option(FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
FetchContent_Declare(googletest
|
FetchContent_Declare(googletest
|
||||||
|
@ -30,7 +30,7 @@ int main(int argc, const char* argv[]) {
|
|||||||
// Plot a function:
|
// Plot a function:
|
||||||
std::vector<int> ys(100);
|
std::vector<int> ys(100);
|
||||||
for (int x = 0; x < 100; x++)
|
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++)
|
for (int x = 0; x < 99; x++)
|
||||||
c.DrawPointLine(x, ys[x], x + 1, ys[x + 1], Color::Red);
|
c.DrawPointLine(x, ys[x], x + 1, ys[x + 1], Color::Red);
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ std::vector<std::vector<ColorInfo>> ColorInfoSorted2D() {
|
|||||||
[](const ColorInfo& A, const ColorInfo& B) {
|
[](const ColorInfo& A, const ColorInfo& B) {
|
||||||
return A.value < B.value;
|
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_index = i + 1;
|
||||||
int best_distance = 255 * 255 * 3;
|
int best_distance = 255 * 255 * 3;
|
||||||
for (size_t j = i + 1; j < column.size(); ++j) {
|
for (size_t j = i + 1; j < column.size(); ++j) {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
int main(int argc, const char* argv[]) {
|
int main(int argc, const char* argv[]) {
|
||||||
using namespace ftxui;
|
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);
|
std::string title = std::to_string(dimx) + "x" + std::to_string(dimy);
|
||||||
return window(text(title) | hcenter | bold,
|
return window(text(title) | hcenter | bold,
|
||||||
text("content") | hcenter | dim) |
|
text("content") | hcenter | dim) |
|
||||||
|
@ -41,7 +41,7 @@ int main(int argc, const char* argv[]) {
|
|||||||
|
|
||||||
int remaining_threads = 12;
|
int remaining_threads = 12;
|
||||||
|
|
||||||
int nb_queued = remaining_tasks.size();
|
int nb_queued = (int)remaining_tasks.size();
|
||||||
int nb_active = 0;
|
int nb_active = 0;
|
||||||
int nb_done = 0;
|
int nb_done = 0;
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
int main(int argc, const char* argv[]) {
|
int main(int argc, const char* argv[]) {
|
||||||
using namespace ftxui;
|
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);
|
std::string title = std::to_string(dimx) + "x" + std::to_string(dimy);
|
||||||
return window(text(title) | hcenter | bold,
|
return window(text(title) | hcenter | bold,
|
||||||
text("content") | hcenter | dim) |
|
text("content") | hcenter | dim) |
|
||||||
|
Loading…
Reference in New Issue
Block a user