Commit 631da2ca authored by Chen Bill's avatar Chen Bill Committed by GitHub

clean using effect_container, effect_vector (#632)

* clean using effect_container

* clean using effect_vector
parent 301b8cc3
...@@ -26,6 +26,8 @@ struct chain; ...@@ -26,6 +26,8 @@ struct chain;
using card_set = std::set<card*, card_sort>; using card_set = std::set<card*, card_sort>;
using card_vector = std::vector<card*>; using card_vector = std::vector<card*>;
using effect_container = std::multimap<uint32, effect*>;
using effect_indexer = std::unordered_map<effect*, effect_container::iterator>;
struct card_state { struct card_state {
uint32 code{ 0 }; uint32 code{ 0 };
...@@ -116,8 +118,6 @@ public: ...@@ -116,8 +118,6 @@ public:
return std::hash<uint16>()(v.second); return std::hash<uint16>()(v.second);
} }
}; };
using effect_container = std::multimap<uint32, effect*>;
using effect_indexer = std::unordered_map<effect*, effect_container::iterator>;
using effect_relation = std::unordered_set<std::pair<effect*, uint16>, effect_relation_hash>; using effect_relation = std::unordered_set<std::pair<effect*, uint16>, effect_relation_hash>;
using relation_map = std::unordered_map<card*, uint32>; using relation_map = std::unordered_map<card*, uint32>;
using counter_map = std::map<uint16, uint16>; using counter_map = std::map<uint16, uint16>;
......
...@@ -33,6 +33,8 @@ class duel; ...@@ -33,6 +33,8 @@ class duel;
class group; class group;
class effect; class effect;
using effect_vector = std::vector<effect*>;
bool check_playerid(int32 playerid); bool check_playerid(int32 playerid);
struct tevent { struct tevent {
...@@ -100,8 +102,6 @@ struct player_info { ...@@ -100,8 +102,6 @@ struct player_info {
card_vector tag_list_extra; card_vector tag_list_extra;
}; };
struct field_effect { struct field_effect {
using effect_container = std::multimap<uint32, effect*>;
using effect_indexer = std::unordered_map<effect*, effect_container::iterator>;
using oath_effects = std::unordered_map<effect*, effect*>; using oath_effects = std::unordered_map<effect*, effect*>;
using effect_collection = std::unordered_set<effect*>; using effect_collection = std::unordered_set<effect*>;
using gain_effects = std::unordered_map<card*, effect*>; using gain_effects = std::unordered_map<card*, effect*>;
...@@ -171,7 +171,6 @@ union return_value { ...@@ -171,7 +171,6 @@ union return_value {
int64 lvalue[SIZE_LVALUE]; int64 lvalue[SIZE_LVALUE];
}; };
struct processor { struct processor {
using effect_vector = std::vector<effect*>;
using option_vector = std::vector<uint32>; using option_vector = std::vector<uint32>;
using card_list = std::list<card*>; using card_list = std::list<card*>;
using event_list = std::list<tevent>; using event_list = std::list<tevent>;
...@@ -364,8 +363,6 @@ struct processor { ...@@ -364,8 +363,6 @@ struct processor {
}; };
class field { class field {
public: public:
using effect_container = std::multimap<uint32, effect*>;
using effect_vector = std::vector<effect*>;
using card_list = std::list<card*>; using card_list = std::list<card*>;
using event_list = std::list<tevent>; using event_list = std::list<tevent>;
using chain_list = std::list<chain>; using chain_list = std::list<chain>;
......
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