mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Rework internal module registration to happen in constructors.
This commit is contained in:
@@ -58,7 +58,8 @@ namespace love
|
||||
namespace system
|
||||
{
|
||||
|
||||
System::System()
|
||||
System::System(const char *name)
|
||||
: Module(M_SYSTEM, name)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
**/
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user