mirror of
https://github.com/love2d/love.git
synced 2026-08-14 10:13:46 +02:00
Add the ability to have formally deprecated functions.
Functions which are deprecated will print out a message and show up in a small dialog on-screen, when they're first called. Deprecation output is disabled in fused mode by default, and can be modified with love.setDeprecationOutput(enable). --HG-- branch : minor
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
// LOVE
|
||||
#include "Module.h"
|
||||
#include "Exception.h"
|
||||
#include "deprecation.h"
|
||||
|
||||
// std
|
||||
#include <map>
|
||||
@@ -61,6 +62,11 @@ namespace love
|
||||
love::Type Module::type("Module", &Object::type);
|
||||
Module *Module::instances[] = {};
|
||||
|
||||
Module::Module()
|
||||
{
|
||||
initDeprecation();
|
||||
}
|
||||
|
||||
Module::~Module()
|
||||
{
|
||||
ModuleRegistry ®istry = registryInstance();
|
||||
@@ -83,6 +89,8 @@ Module::~Module()
|
||||
}
|
||||
|
||||
freeEmptyRegistry();
|
||||
|
||||
deinitDeprecation();
|
||||
}
|
||||
|
||||
void Module::registerInstance(Module *instance)
|
||||
|
||||
Reference in New Issue
Block a user