diff --git a/include/about_tab.hpp b/include/about_tab.hpp index b2854b4..a7e5fbb 100644 --- a/include/about_tab.hpp +++ b/include/about_tab.hpp @@ -49,8 +49,8 @@ namespace nxdt::views void layout(NVGcontext* vg, brls::Style* style, brls::FontStash* stash) override; public: - AboutTab(void); - ~AboutTab(void); + AboutTab(); + ~AboutTab(); }; } diff --git a/include/async_task.hpp b/include/async_task.hpp index ab6b361..c25de8e 100644 --- a/include/async_task.hpp +++ b/include/async_task.hpp @@ -101,7 +101,7 @@ namespace nxdt::tasks NON_COPYABLE(AsyncTask); NON_MOVEABLE(AsyncTask); - virtual ~AsyncTask(void) noexcept + virtual ~AsyncTask() noexcept { /* Return right away if the task isn't running. */ if (this->getStatus() != AsyncTaskStatus::RUNNING) return; @@ -159,7 +159,7 @@ namespace nxdt::tasks } public: - AsyncTask(void) = default; + AsyncTask() = default; /* Cancels the task. Runs on the calling thread. */ void cancel(void) noexcept diff --git a/include/data_transfer_progress_display.hpp b/include/data_transfer_progress_display.hpp index 59564ed..10b4f83 100644 --- a/include/data_transfer_progress_display.hpp +++ b/include/data_transfer_progress_display.hpp @@ -42,8 +42,8 @@ namespace nxdt::views void layout(NVGcontext* vg, brls::Style* style, brls::FontStash* stash) override; public: - DataTransferProgressDisplay(void); - ~DataTransferProgressDisplay(void); + DataTransferProgressDisplay(); + ~DataTransferProgressDisplay(); void setProgress(const nxdt::tasks::DataTransferProgress& progress); diff --git a/include/data_transfer_task.hpp b/include/data_transfer_task.hpp index 018bdc3..62429c6 100644 --- a/include/data_transfer_task.hpp +++ b/include/data_transfer_task.hpp @@ -190,13 +190,13 @@ namespace nxdt::tasks } public: - DataTransferTask(void) + DataTransferTask() { /* Create task handler. */ this->task_handler = new Handler(DATA_TRANSFER_TASK_INTERVAL, this); } - ~DataTransferTask(void) + ~DataTransferTask() { /* Stop task handler. Borealis' task manager will take care of deleting it. */ this->task_handler->stop(); diff --git a/include/download_task.hpp b/include/download_task.hpp index 7ac49df..ef49dcc 100644 --- a/include/download_task.hpp +++ b/include/download_task.hpp @@ -42,7 +42,7 @@ namespace nxdt::tasks NON_MOVEABLE(DownloadTask); public: - DownloadTask(void) = default; + DownloadTask() = default; /* Runs on the asynchronous task thread. Required by cURL. */ /* Make sure to pass it to either httpDownloadFile() or httpDownloadData() with 'this' as the user pointer. */ @@ -85,7 +85,7 @@ namespace nxdt::tasks } public: - DownloadFileTask(void) = default; + DownloadFileTask() = default; }; /* Asynchronous task to store downloaded data into a dynamically allocated buffer using a URL. */ @@ -110,7 +110,7 @@ namespace nxdt::tasks } public: - DownloadDataTask(void) = default; + DownloadDataTask() = default; }; } diff --git a/include/dump_options_frame.hpp b/include/dump_options_frame.hpp index dadbcd3..a3ce10c 100644 --- a/include/dump_options_frame.hpp +++ b/include/dump_options_frame.hpp @@ -364,7 +364,7 @@ namespace nxdt::views this->setContentView(this->list); } - ~DumpOptionsFrame(void) + ~DumpOptionsFrame() { /* Unregister task listener. */ this->root_view->UnregisterUmsTaskListener(this->ums_task_sub); diff --git a/include/error_frame.hpp b/include/error_frame.hpp index 4fd705a..71ab0b7 100644 --- a/include/error_frame.hpp +++ b/include/error_frame.hpp @@ -41,7 +41,7 @@ namespace nxdt::views public: ErrorFrame(std::string msg = ""); - ~ErrorFrame(void); + ~ErrorFrame(); void SetMessage(std::string msg); }; diff --git a/include/gamecard_tab.hpp b/include/gamecard_tab.hpp index 05040eb..3cbf8db 100644 --- a/include/gamecard_tab.hpp +++ b/include/gamecard_tab.hpp @@ -50,7 +50,7 @@ namespace nxdt::views public: GameCardTab(RootView *root_view); - ~GameCardTab(void); + ~GameCardTab(); }; } diff --git a/include/options_tab.hpp b/include/options_tab.hpp index 58ab4d5..0ff3a61 100644 --- a/include/options_tab.hpp +++ b/include/options_tab.hpp @@ -64,8 +64,8 @@ namespace nxdt::views bool onCancel(void) override; public: - OptionsTabUpdateApplicationFrame(void); - ~OptionsTabUpdateApplicationFrame(void); + OptionsTabUpdateApplicationFrame(); + ~OptionsTabUpdateApplicationFrame(); }; class OptionsTab: public brls::List @@ -73,7 +73,6 @@ namespace nxdt::views private: RootView *root_view = nullptr; - brls::SelectListItem *unmount_ums_device = nullptr; nxdt::tasks::UmsDeviceVector ums_devices{}; nxdt::tasks::UmsEvent::Subscription ums_task_sub; @@ -84,7 +83,7 @@ namespace nxdt::views void DisplayNotification(const std::string& str); public: OptionsTab(RootView *root_view); - ~OptionsTab(void); + ~OptionsTab(); }; } diff --git a/include/root_view.hpp b/include/root_view.hpp index 4797c69..d025f32 100644 --- a/include/root_view.hpp +++ b/include/root_view.hpp @@ -60,8 +60,8 @@ namespace nxdt::views brls::View *getDefaultFocus(void) override; public: - RootView(void); - ~RootView(void); + RootView(); + ~RootView(); static std::string GetFormattedDateString(const struct tm& timeinfo); diff --git a/include/tasks.hpp b/include/tasks.hpp index e80de0e..443c735 100644 --- a/include/tasks.hpp +++ b/include/tasks.hpp @@ -75,8 +75,8 @@ namespace nxdt::tasks void run(retro_time_t current_time) override; public: - StatusInfoTask(void); - ~StatusInfoTask(void); + StatusInfoTask(); + ~StatusInfoTask(); bool IsInternetConnectionAvailable(void); @@ -97,8 +97,8 @@ namespace nxdt::tasks void run(retro_time_t current_time) override; public: - GameCardTask(void); - ~GameCardTask(void); + GameCardTask(); + ~GameCardTask(); EVENT_SUBSCRIPTION(GameCardStatusEvent, gc_status_event); }; @@ -119,8 +119,8 @@ namespace nxdt::tasks void run(retro_time_t current_time) override; public: - TitleTask(void); - ~TitleTask(void); + TitleTask(); + ~TitleTask(); /* Intentionally left here to let views retrieve title metadata on-demand. */ const TitleApplicationMetadataVector& GetApplicationMetadata(bool is_system); @@ -146,8 +146,8 @@ namespace nxdt::tasks void run(retro_time_t current_time) override; public: - UmsTask(void); - ~UmsTask(void); + UmsTask(); + ~UmsTask(); /* Intentionally left here to let views retrieve UMS device info on-demand. */ const UmsDeviceVector& GetUmsDevices(void); @@ -167,8 +167,8 @@ namespace nxdt::tasks void run(retro_time_t current_time) override; public: - UsbHostTask(void); - ~UsbHostTask(void); + UsbHostTask(); + ~UsbHostTask(); EVENT_SUBSCRIPTION(UsbHostEvent, usb_host_event); }; diff --git a/include/titles_tab.hpp b/include/titles_tab.hpp index b89de53..9dc83a9 100644 --- a/include/titles_tab.hpp +++ b/include/titles_tab.hpp @@ -41,7 +41,7 @@ namespace nxdt::views public: TitlesTabPopup(const TitleApplicationMetadata *app_metadata, bool is_system); - ~TitlesTabPopup(void); + ~TitlesTabPopup(); }; /* Expanded ListItem class to hold application metadata. */ @@ -80,7 +80,7 @@ namespace nxdt::views public: TitlesTab(RootView *root_view, bool is_system); - ~TitlesTab(void); + ~TitlesTab(); }; } diff --git a/source/about_tab.cpp b/source/about_tab.cpp index 23f59f8..508563f 100644 --- a/source/about_tab.cpp +++ b/source/about_tab.cpp @@ -29,7 +29,7 @@ using namespace i18n::literals; /* For _i18n. */ namespace nxdt::views { - AboutTab::AboutTab(void) : brls::List() + AboutTab::AboutTab() : brls::List() { /* Set custom spacing. */ this->setSpacing(this->getSpacing() / 2); @@ -69,7 +69,7 @@ namespace nxdt::views this->addView(new AboutTabLabel(brls::LabelStyle::SMALL, i18n::getStr("about_tab/links/line_00"_i18n, DISCORD_SERVER_URL))); } - AboutTab::~AboutTab(void) + AboutTab::~AboutTab() { delete this->logo; } diff --git a/source/data_transfer_progress_display.cpp b/source/data_transfer_progress_display.cpp index 6170e4e..aa0cf8b 100644 --- a/source/data_transfer_progress_display.cpp +++ b/source/data_transfer_progress_display.cpp @@ -23,7 +23,7 @@ namespace nxdt::views { - DataTransferProgressDisplay::DataTransferProgressDisplay(void) + DataTransferProgressDisplay::DataTransferProgressDisplay() { this->progress_display = new brls::ProgressDisplay(); this->progress_display->setParent(this); @@ -37,7 +37,7 @@ namespace nxdt::views this->speed_eta_lbl->setParent(this); } - DataTransferProgressDisplay::~DataTransferProgressDisplay(void) + DataTransferProgressDisplay::~DataTransferProgressDisplay() { delete this->progress_display; delete this->size_lbl; diff --git a/source/error_frame.cpp b/source/error_frame.cpp index fff009a..200443f 100644 --- a/source/error_frame.cpp +++ b/source/error_frame.cpp @@ -33,7 +33,7 @@ namespace nxdt::views this->label->setParent(this); } - ErrorFrame::~ErrorFrame(void) + ErrorFrame::~ErrorFrame() { delete this->label; } diff --git a/source/gamecard_tab.cpp b/source/gamecard_tab.cpp index 55a03c7..e465fad 100644 --- a/source/gamecard_tab.cpp +++ b/source/gamecard_tab.cpp @@ -45,7 +45,7 @@ namespace nxdt::views this->ProcessGameCardStatus(GameCardStatus_NotInserted); } - GameCardTab::~GameCardTab(void) + GameCardTab::~GameCardTab() { /* Unregister task listener. */ this->root_view->UnregisterGameCardTaskListener(this->gc_status_task_sub); diff --git a/source/options_tab.cpp b/source/options_tab.cpp index 8a908f3..e1768e7 100644 --- a/source/options_tab.cpp +++ b/source/options_tab.cpp @@ -70,7 +70,7 @@ namespace nxdt::views this->download_task.execute(path, url, force_https); } - OptionsTabUpdateApplicationFrame::OptionsTabUpdateApplicationFrame(void) : brls::StagedAppletFrame(false) + OptionsTabUpdateApplicationFrame::OptionsTabUpdateApplicationFrame() : brls::StagedAppletFrame(false) { /* Set UI properties. */ this->setTitle("options_tab/update_app/label"_i18n); @@ -138,7 +138,7 @@ namespace nxdt::views this->json_task.execute(GITHUB_API_RELEASE_URL, true); } - OptionsTabUpdateApplicationFrame::~OptionsTabUpdateApplicationFrame(void) + OptionsTabUpdateApplicationFrame::~OptionsTabUpdateApplicationFrame() { /* Free parsed JSON data. */ utilsFreeGitHubReleaseJsonData(&(this->json_data)); @@ -317,17 +317,17 @@ namespace nxdt::views this->addView(naming_convention); - /* Unmount UMS devices. */ + /* Unmount USB Mass Storage devices. */ /* We will replace its default click event with a new one that will: */ /* 1. Check if any UMS devices are available before displaying the dropdown and display a notification if there are none. */ /* 2. Generate the string vector required by the dropdown. */ /* 3. Initialize the dropdown and pass a custom callback that will take care of unmounting the selected device. */ - this->unmount_ums_device = new brls::SelectListItem("options_tab/unmount_ums_device/label"_i18n, { "dummy" }, 0, - i18n::getStr("options_tab/unmount_ums_device/description"_i18n, APP_TITLE), false); + brls::SelectListItem *unmount_ums_device = new brls::SelectListItem("options_tab/unmount_ums_device/label"_i18n, { "dummy" }, 0, + i18n::getStr("options_tab/unmount_ums_device/description"_i18n, APP_TITLE), false); - this->unmount_ums_device->getClickEvent()->unsubscribeAll(); + unmount_ums_device->getClickEvent()->unsubscribeAll(); - this->unmount_ums_device->getClickEvent()->subscribe([this](brls::View* view) { + unmount_ums_device->getClickEvent()->subscribe([this](brls::View* view) { if (this->ums_devices.empty()) { /* Display a notification if we haven't mounted any UMS devices at all. */ @@ -340,7 +340,9 @@ namespace nxdt::views for(nxdt::tasks::UmsDeviceVectorEntry ums_device_entry : this->ums_devices) values.push_back(ums_device_entry.second); /* Display dropdown. */ - brls::Dropdown::open(this->unmount_ums_device->getLabel(), values, [this](int idx) { + brls::SelectListItem *unmount_ums_device = static_cast(view); + + brls::Dropdown::open(unmount_ums_device->getLabel(), values, [this](int idx) { /* Make sure the current value isn't out of bounds. */ if (idx < 0 || idx >= static_cast(this->ums_devices.size())) return; @@ -358,7 +360,7 @@ namespace nxdt::views this->ums_devices = this->root_view->GetUmsDevices(); /* Subscribe to the UMS device event. */ - this->ums_task_sub = this->root_view->RegisterUmsTaskListener([this](const nxdt::tasks::UmsDeviceVector& ums_devices) { + this->ums_task_sub = this->root_view->RegisterUmsTaskListener([this, unmount_ums_device](const nxdt::tasks::UmsDeviceVector& ums_devices) { /* Update UMS devices vector. */ this->ums_devices = this->root_view->GetUmsDevices(); @@ -368,7 +370,7 @@ namespace nxdt::views /* Update SelectListItem values. */ /* If the dropdown menu is already being displayed, it'll be reloaded or popped from the view stack, depending on whether the provided vector is empty or not. */ - this->unmount_ums_device->updateValues(values); + unmount_ums_device->updateValues(values); }); this->addView(unmount_ums_device); @@ -421,7 +423,7 @@ namespace nxdt::views this->addView(update_app); } - OptionsTab::~OptionsTab(void) + OptionsTab::~OptionsTab() { this->root_view->UnregisterUmsTaskListener(this->ums_task_sub); diff --git a/source/root_view.cpp b/source/root_view.cpp index 14309fa..b6d355b 100644 --- a/source/root_view.cpp +++ b/source/root_view.cpp @@ -31,7 +31,7 @@ using namespace i18n::literals; /* For _i18n. */ namespace nxdt::views { - RootView::RootView(void) : brls::TabFrame() + RootView::RootView() : brls::TabFrame() { int material = brls::Application::getFontStash()->material; @@ -168,7 +168,7 @@ namespace nxdt::views }); } - RootView::~RootView(void) + RootView::~RootView() { /* Unregister task listeners. */ this->usb_host_task->UnregisterListener(this->usb_host_task_sub); diff --git a/source/tasks.cpp b/source/tasks.cpp index ace58b4..9f7b652 100644 --- a/source/tasks.cpp +++ b/source/tasks.cpp @@ -30,13 +30,13 @@ namespace nxdt::tasks { /* Status info task. */ - StatusInfoTask::StatusInfoTask(void) : brls::RepeatingTask(NXDT_TASK_INTERVAL) + StatusInfoTask::StatusInfoTask() : brls::RepeatingTask(NXDT_TASK_INTERVAL) { brls::RepeatingTask::start(); LOG_MSG_DEBUG("Status info task started."); } - StatusInfoTask::~StatusInfoTask(void) + StatusInfoTask::~StatusInfoTask() { LOG_MSG_DEBUG("Status info task stopped."); } @@ -84,7 +84,7 @@ namespace nxdt::tasks /* Gamecard task. */ - GameCardTask::GameCardTask(void) : brls::RepeatingTask(NXDT_TASK_INTERVAL) + GameCardTask::GameCardTask() : brls::RepeatingTask(NXDT_TASK_INTERVAL) { brls::RepeatingTask::start(); LOG_MSG_DEBUG("Gamecard task started."); @@ -92,7 +92,7 @@ namespace nxdt::tasks this->first_notification = (gamecardGetStatus() >= GameCardStatus_Processing); } - GameCardTask::~GameCardTask(void) + GameCardTask::~GameCardTask() { LOG_MSG_DEBUG("Gamecard task stopped."); } @@ -134,7 +134,7 @@ namespace nxdt::tasks /* Title task. */ - TitleTask::TitleTask(void) : brls::RepeatingTask(NXDT_TASK_INTERVAL) + TitleTask::TitleTask() : brls::RepeatingTask(NXDT_TASK_INTERVAL) { /* Get system metadata entries. */ this->PopulateApplicationMetadataVector(true); @@ -147,7 +147,7 @@ namespace nxdt::tasks LOG_MSG_DEBUG("Title task started."); } - TitleTask::~TitleTask(void) + TitleTask::~TitleTask() { /* Clear application metadata vectors. */ this->system_metadata.clear(); @@ -203,13 +203,13 @@ namespace nxdt::tasks /* USB Mass Storage task. */ - UmsTask::UmsTask(void) : brls::RepeatingTask(NXDT_TASK_INTERVAL) + UmsTask::UmsTask() : brls::RepeatingTask(NXDT_TASK_INTERVAL) { brls::RepeatingTask::start(); LOG_MSG_DEBUG("UMS task started."); } - UmsTask::~UmsTask(void) + UmsTask::~UmsTask() { /* Clear UMS device vector. */ this->ums_devices_vector.clear(); @@ -280,13 +280,13 @@ namespace nxdt::tasks /* USB host device connection task. */ - UsbHostTask::UsbHostTask(void) : brls::RepeatingTask(NXDT_TASK_INTERVAL) + UsbHostTask::UsbHostTask() : brls::RepeatingTask(NXDT_TASK_INTERVAL) { brls::RepeatingTask::start(); LOG_MSG_DEBUG("USB host task started."); } - UsbHostTask::~UsbHostTask(void) + UsbHostTask::~UsbHostTask() { LOG_MSG_DEBUG("USB host task stopped."); } diff --git a/source/titles_tab.cpp b/source/titles_tab.cpp index 62b3b89..cde0249 100644 --- a/source/titles_tab.cpp +++ b/source/titles_tab.cpp @@ -50,7 +50,7 @@ namespace nxdt::views this->addTab("Blue", new brls::Rectangle(nvgRGB(0, 0, 255))); } - TitlesTabPopup::~TitlesTabPopup(void) + TitlesTabPopup::~TitlesTabPopup() { /* Free title information. */ if (!this->is_system) @@ -96,7 +96,7 @@ namespace nxdt::views } } - TitlesTab::~TitlesTab(void) + TitlesTab::~TitlesTab() { /* Unregister task listener if this is the user titles tab. */ if (!this->is_system) this->root_view->UnregisterTitleTaskListener(this->title_task_sub);