From 3f0dd987f0754ce36511cbe10b70b2f28c547a9c Mon Sep 17 00:00:00 2001 From: Tobias Loose Date: Sat, 23 Nov 2013 11:26:10 +0100 Subject: [PATCH] Remove bool CardInstance::hasSubtype(const char * _subtype) There exists bool CardInstance::hasSubtype(const string& _subtype) and the const char* version converts _subtype into string deeper in the call hierarchy anyway. So both methods did the same. --- projects/mtg/include/CardPrimitive.h | 1 - projects/mtg/src/CardPrimitive.cpp | 6 ------ 2 files changed, 7 deletions(-) diff --git a/projects/mtg/include/CardPrimitive.h b/projects/mtg/include/CardPrimitive.h index 6bad49cee..064478bc5 100644 --- a/projects/mtg/include/CardPrimitive.h +++ b/projects/mtg/include/CardPrimitive.h @@ -101,7 +101,6 @@ public: int removeType(string value, int removeAll = 0); int removeType(int value, int removeAll = 0); bool hasSubtype(int _subtype); - bool hasSubtype(const char * _subtype); bool hasSubtype(const string& _subtype); bool hasType(int _type); bool hasType(const char * type); diff --git a/projects/mtg/src/CardPrimitive.cpp b/projects/mtg/src/CardPrimitive.cpp index 0af4460d5..9946f138a 100644 --- a/projects/mtg/src/CardPrimitive.cpp +++ b/projects/mtg/src/CardPrimitive.cpp @@ -350,12 +350,6 @@ bool CardPrimitive::hasType(const char * _type) return hasType(id); } -bool CardPrimitive::hasSubtype(const char * _subtype) -{ - int id = MTGAllCards::findType(_subtype); - return hasType(id); -} - bool CardPrimitive::hasSubtype(const string& _subtype) { int id = MTGAllCards::findType(_subtype);