Rework internal module registration to happen in constructors.

This commit is contained in:
Sasha Szpakowski
2024-02-24 15:21:38 -04:00
parent c7e4dafd88
commit 1e97e09b28
73 changed files with 154 additions and 248 deletions
+2 -1
View File
@@ -58,7 +58,8 @@ namespace love
namespace system
{
System::System()
System::System(const char *name)
: Module(M_SYSTEM, name)
{
}
+1 -4
View File
@@ -48,12 +48,9 @@ public:
POWER_MAX_ENUM
};
System();
System(const char *name);
virtual ~System() {}
// Implements Module.
virtual ModuleType getModuleType() const { return M_SYSTEM; }
/**
* Gets the current operating system.
**/
+1 -5
View File
@@ -39,14 +39,10 @@ namespace sdl
{
System::System()
: love::system::System("love.system.sdl")
{
}
const char *System::getName() const
{
return "love.system.sdl";
}
int System::getProcessorCount() const
{
return SDL_GetCPUCount();
-3
View File
@@ -42,9 +42,6 @@ public:
System();
virtual ~System() {}
// Implements Module.
const char *getName() const override;
int getProcessorCount() const override;
void setClipboardText(const std::string &text) const override;