mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-17 00:18:11 +08:00
Remove codecvt dependency. (#516)
This resolves: https://github.com/ArthurSonzogni/FTXUI/issues/514
This commit is contained in:

committed by
GitHub

parent
55b9706cfd
commit
05f29ff3b3
@@ -26,8 +26,8 @@ TEST(AnimationTest, StartAndEnd) {
|
||||
animation::easing::BounceInOut,
|
||||
};
|
||||
for (auto& it : functions) {
|
||||
EXPECT_NEAR(0.f, it(0.f), 1.0e-4);
|
||||
EXPECT_NEAR(1.f, it(1.f), 1.0e-4);
|
||||
EXPECT_NEAR(0.F, it(0.F), 1.0e-4);
|
||||
EXPECT_NEAR(1.F, it(1.F), 1.0e-4);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -3,8 +3,9 @@
|
||||
|
||||
namespace ftxui {
|
||||
|
||||
// NOLINTNEXTLINE
|
||||
Loop::Loop(ScreenInteractive* screen, Component component)
|
||||
: screen_(screen), component_(component) {
|
||||
: screen_(screen), component_(std::move(component)) {
|
||||
screen_->PreMain();
|
||||
}
|
||||
|
||||
|
@@ -366,7 +366,7 @@ CapturedMouse ScreenInteractive::CaptureMouse() {
|
||||
}
|
||||
|
||||
void ScreenInteractive::Loop(Component component) { // NOLINT
|
||||
class Loop loop(this, component);
|
||||
class Loop loop(this, std::move(component));
|
||||
loop.Run();
|
||||
}
|
||||
|
||||
@@ -559,12 +559,13 @@ void ScreenInteractive::RunOnceBlocking(Component component) {
|
||||
RunOnce(component);
|
||||
}
|
||||
|
||||
// NOLINTNEXTLINE
|
||||
void ScreenInteractive::RunOnce(Component component) {
|
||||
Task task;
|
||||
while (task_receiver_->ReceiveNonBlocking(&task)) {
|
||||
HandleTask(component, task);
|
||||
}
|
||||
Draw(component);
|
||||
Draw(std::move(component));
|
||||
}
|
||||
|
||||
void ScreenInteractive::HandleTask(Component component, Task& task) {
|
||||
@@ -620,8 +621,9 @@ void ScreenInteractive::HandleTask(Component component, Task& task) {
|
||||
|
||||
// NOLINTNEXTLINE
|
||||
void ScreenInteractive::Draw(Component component) {
|
||||
if (frame_valid_)
|
||||
if (frame_valid_) {
|
||||
return;
|
||||
}
|
||||
auto document = component->Render();
|
||||
int dimx = 0;
|
||||
int dimy = 0;
|
||||
|
Reference in New Issue
Block a user