Updates, including improvement to atomic code to ensure portability.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1031 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
coppro
2008-08-01 20:58:09 +00:00
parent 4e55f0a208
commit b49966dc03
6 changed files with 21 additions and 5 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ void GraphDataPre::splitList(size_t axis) {
struct SmartLess{
inline operator () (const String& a, const String& b) const { return smart_less(a,b); }
inline bool operator () (const String& a, const String& b) const { return smart_less(a,b); }
};
DECLARE_TYPEOF(map<String COMMA UInt COMMA SmartLess>);
+1
View File
@@ -11,6 +11,7 @@
#include <util/prec.hpp>
#include <gui/set/panel.hpp>
#include <wx/spinctrl.h>
class CardViewer;
class FilteredCardList;
-1
View File
@@ -212,4 +212,3 @@ class Script : public ScriptValue {
// ----------------------------------------------------------------------------- : EOF
#endif
+2 -2
View File
@@ -54,7 +54,7 @@
#define HAVE_FAST_ATOMIC
// ----------------------------------------------------------------------------- : AtomicInt : GCC
#elif defined(__GNUC__)
#elif defined(__GNUC__) && defined(__i486)
/// An integer which is equivalent to an AtomicInt, but which doesn't support attomic operations
typedef unsigned int AtomicIntEquiv;
@@ -70,7 +70,7 @@
return __sync_add_and_fetch(&v,1);
}
inline AtomicInt operator -- () {
return __sync_add_and_fetch(&v,(AtomicIntEquiv)-1);
return __sync_sub_and_fetch(&v,1);
}
private:
AtomicIntEquiv v;