From 080fd326ed3d672e66d74e73a5f36a241918cc75 Mon Sep 17 00:00:00 2001 From: arxanas Date: Thu, 26 Jun 2014 16:57:47 -0400 Subject: [PATCH 1/2] Fixed #131: Compiles on OS X now. --- cockatrice/src/carddatabase.cpp | 4 ++-- cockatrice/src/carddatabase.h | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cockatrice/src/carddatabase.cpp b/cockatrice/src/carddatabase.cpp index 5a942b0f..1677cf69 100644 --- a/cockatrice/src/carddatabase.cpp +++ b/cockatrice/src/carddatabase.cpp @@ -275,7 +275,7 @@ CardInfo::CardInfo(CardDatabase *_db, bool _cipt, int _tableRow, const SetList &_sets, - QMap _muIds) + MuidMap _muIds) : db(_db), name(_name), isToken(_isToken), @@ -610,7 +610,7 @@ void CardDatabase::loadCardsFromXml(QXmlStreamReader &xml) if (xml.name() == "card") { QString name, manacost, type, pt, text; QStringList colors; - QMap muids; + MuidMap muids; SetList sets; int tableRow = 0; int loyalty = 0; diff --git a/cockatrice/src/carddatabase.h b/cockatrice/src/carddatabase.h index 70d77bca..28d56d13 100644 --- a/cockatrice/src/carddatabase.h +++ b/cockatrice/src/carddatabase.h @@ -20,6 +20,9 @@ class QNetworkRequest; typedef QMap QStringMap; +// If we don't typedef this, CardInfo::CardInfo will refuse to compile on OS X. +typedef QMap MuidMap; + class CardSet : public QList { private: QString shortName, longName; @@ -100,7 +103,7 @@ private: QString text; QStringList colors; int loyalty; - QMap muIds; + MuidMap muIds; bool cipt; int tableRow; QPixmap *pixmap; @@ -118,7 +121,7 @@ public: bool _cipt = false, int _tableRow = 0, const SetList &_sets = SetList(), - QMap muids = QMap()); + MuidMap muids = MuidMap()); ~CardInfo(); const QString &getName() const { return name; } bool getIsToken() const { return isToken; } From 1d02e0d5ec3288d90272e426e79056c78b007be3 Mon Sep 17 00:00:00 2001 From: Daenyth Date: Fri, 27 Jun 2014 20:00:29 -0400 Subject: [PATCH 2/2] Clarify comment about typedef for OSX compiling --- cockatrice/src/carddatabase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cockatrice/src/carddatabase.h b/cockatrice/src/carddatabase.h index 28d56d13..09edeff4 100644 --- a/cockatrice/src/carddatabase.h +++ b/cockatrice/src/carddatabase.h @@ -20,7 +20,7 @@ class QNetworkRequest; typedef QMap QStringMap; -// If we don't typedef this, CardInfo::CardInfo will refuse to compile on OS X. +// If we don't typedef this, CardInfo::CardInfo will refuse to compile on OS X < 10.9 typedef QMap MuidMap; class CardSet : public QList {