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:
@@ -40,6 +40,7 @@ namespace image
|
||||
love::Type Image::type("image", &Module::type);
|
||||
|
||||
Image::Image()
|
||||
: Module(M_IMAGE, "love.image.magpie")
|
||||
{
|
||||
using namespace magpie;
|
||||
|
||||
@@ -65,11 +66,6 @@ Image::~Image()
|
||||
handler->release();
|
||||
}
|
||||
|
||||
const char *Image::getName() const
|
||||
{
|
||||
return "love.image.magpie";
|
||||
}
|
||||
|
||||
love::image::ImageData *Image::newImageData(Data *data)
|
||||
{
|
||||
return new ImageData(data);
|
||||
|
||||
@@ -52,10 +52,6 @@ public:
|
||||
Image();
|
||||
virtual ~Image();
|
||||
|
||||
// Implements Module.
|
||||
ModuleType getModuleType() const override { return M_IMAGE; }
|
||||
const char *getName() const override;
|
||||
|
||||
/**
|
||||
* Creates new ImageData from FileData.
|
||||
* @param data The FileData containing the encoded image data.
|
||||
|
||||
Reference in New Issue
Block a user