mirror of
https://github.com/love2d/love-android.git
synced 2026-08-19 20:20:25 +02:00
Using latest android branch of LÖVE (6d14516b05c9) that now syncs with default (woooo!)
This commit is contained in:
@@ -21,12 +21,7 @@
|
||||
#ifndef LOVE_OBJECT_H
|
||||
#define LOVE_OBJECT_H
|
||||
|
||||
/**
|
||||
* NOTE: the fact that an SDL header is included in such a widely used header
|
||||
* file is only temporary - in the LOVE 0.10+ codebase we use atomics from
|
||||
* C++11's standard library.
|
||||
**/
|
||||
#include <SDL_atomic.h>
|
||||
#include <atomic>
|
||||
|
||||
namespace love
|
||||
{
|
||||
@@ -47,6 +42,7 @@ public:
|
||||
* Constructor. Sets reference count to one.
|
||||
**/
|
||||
Object();
|
||||
Object(const Object &other);
|
||||
|
||||
/**
|
||||
* Destructor.
|
||||
@@ -57,7 +53,7 @@ public:
|
||||
* Gets the reference count of this Object.
|
||||
* @returns The reference count.
|
||||
**/
|
||||
int getReferenceCount();
|
||||
int getReferenceCount() const;
|
||||
|
||||
/**
|
||||
* Retains the Object, i.e. increases the
|
||||
@@ -75,7 +71,7 @@ public:
|
||||
private:
|
||||
|
||||
// The reference count.
|
||||
SDL_atomic_t count;
|
||||
std::atomic<int> count;
|
||||
|
||||
}; // Object
|
||||
|
||||
@@ -136,7 +132,7 @@ public:
|
||||
private:
|
||||
|
||||
T *object;
|
||||
|
||||
|
||||
}; // StrongRef
|
||||
|
||||
} // love
|
||||
|
||||
Reference in New Issue
Block a user