mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
Compatibility updates step 1.
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@815 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+4
-5
@@ -17,7 +17,6 @@
|
||||
// ----------------------------------------------------------------------------- : AtomicInt : windows
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
|
||||
#ifdef _MSC_VER
|
||||
extern "C" {
|
||||
LONG __cdecl _InterlockedIncrement(LONG volatile *Addend);
|
||||
@@ -61,16 +60,16 @@
|
||||
typedef unsigned int AtomicIntEquiv;
|
||||
|
||||
/// An integer that can be incremented and decremented atomicly
|
||||
class AtomicIntEquiv {
|
||||
class AtomicInt {
|
||||
public:
|
||||
AtomicIntEquiv(AtomicIntEquiv v) : v(v) {}
|
||||
AtomicInt(AtomicIntEquiv v) : v(v) {}
|
||||
inline operator AtomicIntEquiv() const {
|
||||
return v;
|
||||
}
|
||||
inline AtomicIntEquiv operator ++ () {
|
||||
inline AtomicInt operator ++ () {
|
||||
return __sync_add_and_fetch(&v,1);
|
||||
}
|
||||
inline AtomicIntEquiv operator -- () {
|
||||
inline AtomicInt operator -- () {
|
||||
return __sync_add_and_fetch(&v,(AtomicIntEquiv)-1);
|
||||
}
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user