Minor improvements: use std::make_unique when creating unique_ptr, check the code is running from an IRQ before calling xQueueSendFromISR or xQueueSend)
This commit is contained in:
parent
caca6a5cff
commit
b1925ff286
6 changed files with 44 additions and 24 deletions
|
|
@ -46,7 +46,7 @@ std::unique_ptr<Screen> Settings::CreateScreen1() {
|
|||
{Symbols::clock, "Watch face", Apps::SettingWatchFace},
|
||||
}};
|
||||
|
||||
return std::unique_ptr<Screen>(new Screens::List(0, 2, app, settingsController, applications));
|
||||
return std::make_unique<Screens::List>(0, 2, app, settingsController, applications);
|
||||
}
|
||||
|
||||
std::unique_ptr<Screen> Settings::CreateScreen2() {
|
||||
|
|
@ -58,5 +58,5 @@ std::unique_ptr<Screen> Settings::CreateScreen2() {
|
|||
{Symbols::list, "About", Apps::SysInfo},
|
||||
}};
|
||||
|
||||
return std::unique_ptr<Screen>(new Screens::List(1, 2, app, settingsController, applications));
|
||||
return std::make_unique<Screens::List>(1, 2, app, settingsController, applications);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ namespace Pinetime {
|
|||
|
||||
bool Refresh() override;
|
||||
|
||||
void OnButtonEvent(lv_obj_t* object, lv_event_t event);
|
||||
bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override;
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue