mirror of
https://github.com/love2d/love.git
synced 2026-08-13 09:00:54 +02:00
Misc. code cosmetics and improvements
This commit is contained in:
@@ -82,18 +82,12 @@ namespace math
|
||||
Math Math::instance;
|
||||
|
||||
Math::Math()
|
||||
: rng(newRandomGenerator())
|
||||
: rng()
|
||||
{
|
||||
// prevent the runtime from free()-ing this
|
||||
retain();
|
||||
}
|
||||
|
||||
Math::~Math()
|
||||
{
|
||||
if (rng)
|
||||
rng->release();
|
||||
}
|
||||
|
||||
RandomGenerator *Math::newRandomGenerator()
|
||||
{
|
||||
return new RandomGenerator();
|
||||
|
||||
Reference in New Issue
Block a user