Skip to content

Commit

Permalink
removed unnecessary reference to SystemTask
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufmte committed Sep 16, 2022
1 parent 52e4af5 commit adc97a0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/displayapp/DisplayApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction)
currentScreen = std::make_unique<Screens::Steps>(this, motionController, settingsController);
break;
case Apps::Dice:
currentScreen = std::make_unique<Screens::Dice>(this, *systemTask);
currentScreen = std::make_unique<Screens::Dice>(this);
break;
}
currentApp = app;
Expand Down
2 changes: 1 addition & 1 deletion src/displayapp/screens/Dice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ static void btnRollEventHandler(lv_obj_t* obj, lv_event_t event) {
}
}

Dice::Dice(DisplayApp* app, System::SystemTask& systemTask) : Screen(app), systemTask {systemTask} {
Dice::Dice(DisplayApp* app) : Screen(app) {
srand(xTaskGetTickCount() % (std::numeric_limits<unsigned int>::max()));

nCounter.Create();
Expand Down
4 changes: 1 addition & 3 deletions src/displayapp/screens/Dice.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
namespace Pinetime::Applications::Screens {
class Dice : public Screen {
public:
Dice(DisplayApp* app, System::SystemTask& systemTask);
Dice(DisplayApp* app);
~Dice() override;
void Roll();

private:
Pinetime::System::SystemTask& systemTask;

lv_obj_t* btnRoll;
lv_obj_t* btnRollLabel;
lv_obj_t* resultTotalLabel;
Expand Down

0 comments on commit adc97a0

Please sign in to comment.