Commit 56f5fd4b authored by Chen Bill's avatar Chen Bill Committed by GitHub

use unsigned hash in CheckDeck (#2736)

parent 3c24778d
......@@ -75,7 +75,7 @@ static unsigned int checkAvail(unsigned int ot, unsigned int avail) {
return DECKERROR_TCGONLY;
return DECKERROR_NOTAVAIL;
}
unsigned int DeckManager::CheckDeck(Deck& deck, int lfhash, int rule) {
unsigned int DeckManager::CheckDeck(const Deck& deck, unsigned int lfhash, int rule) {
std::unordered_map<int, int> ccount;
// rule
if(deck.main.size() < DECK_MIN_SIZE || deck.main.size() > DECK_MAX_SIZE)
......
......@@ -46,7 +46,7 @@ public:
void LoadLFList();
const wchar_t* GetLFListName(unsigned int lfhash);
const LFList* GetLFList(unsigned int lfhash);
unsigned int CheckDeck(Deck& deck, int lfhash, int rule);
unsigned int CheckDeck(const Deck& deck, unsigned int lfhash, int rule);
int LoadDeck(Deck& deck, int* dbuf, int mainc, int sidec, bool is_packlist = false);
int LoadDeck(Deck& deck, std::istringstream& deckStream, bool is_packlist = false);
bool LoadSide(Deck& deck, int* dbuf, int mainc, int sidec);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment