|
@@ -21,6 +21,13 @@
|
|
|
#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>
|
|
|
+
|
|
|
namespace love
|
|
|
{
|
|
|
|
|
@@ -50,7 +57,7 @@ public:
|
|
|
* Gets the reference count of this Object.
|
|
|
* @returns The reference count.
|
|
|
**/
|
|
|
- int getReferenceCount() const;
|
|
|
+ int getReferenceCount();
|
|
|
|
|
|
/**
|
|
|
* Retains the Object, i.e. increases the
|
|
@@ -155,7 +162,7 @@ public:
|
|
|
private:
|
|
|
|
|
|
// The reference count.
|
|
|
- int count;
|
|
|
+ SDL_atomic_t count;
|
|
|
|
|
|
}; // Object
|
|
|
|