1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-12-23 00:52:10 +00:00

[ci skip] Remove void keyword from C++ ctors/dtors

This commit is contained in:
Pablo Curiel 2024-04-19 12:08:44 +02:00
parent de71768380
commit 6dfbb301df
20 changed files with 64 additions and 63 deletions

View file

@ -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();
};
}

View file

@ -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

View file

@ -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);

View file

@ -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();

View file

@ -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;
};
}

View file

@ -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);

View file

@ -41,7 +41,7 @@ namespace nxdt::views
public:
ErrorFrame(std::string msg = "");
~ErrorFrame(void);
~ErrorFrame();
void SetMessage(std::string msg);
};

View file

@ -50,7 +50,7 @@ namespace nxdt::views
public:
GameCardTab(RootView *root_view);
~GameCardTab(void);
~GameCardTab();
};
}

View file

@ -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();
};
}

View file

@ -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);

View file

@ -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);
};

View file

@ -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();
};
}

View file

@ -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;
}

View file

@ -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;

View file

@ -33,7 +33,7 @@ namespace nxdt::views
this->label->setParent(this);
}
ErrorFrame::~ErrorFrame(void)
ErrorFrame::~ErrorFrame()
{
delete this->label;
}

View file

@ -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);

View file

@ -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<brls::SelectListItem*>(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<int>(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);

View file

@ -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);

View file

@ -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.");
}

View file

@ -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);