Commit 0f6b3dd5 authored by DailyShana's avatar DailyShana

modernize: use using instead of typedef

parent 044311cf
......@@ -94,14 +94,14 @@ public:
return std::hash<uint16>()(v.second);
}
};
typedef std::vector<card*> card_vector;
typedef std::multimap<uint32, effect*> effect_container;
typedef std::set<card*, card_sort> card_set;
typedef std::unordered_map<effect*, effect_container::iterator> effect_indexer;
typedef std::unordered_set<std::pair<effect*, uint16>, effect_relation_hash> effect_relation;
typedef std::unordered_map<card*, uint32> relation_map;
typedef std::map<uint16, std::array<uint16, 2>> counter_map;
typedef std::map<uint32, int32> effect_count;
using card_vector = std::vector<card*>;
using effect_container = std::multimap<uint32, effect*>;
using card_set = std::set<card*, card_sort>;
using effect_indexer = std::unordered_map<effect*, effect_container::iterator>;
using effect_relation = std::unordered_set<std::pair<effect*, uint16>, effect_relation_hash>;
using relation_map = std::unordered_map<card*, uint32>;
using counter_map = std::map<uint16, std::array<uint16, 2>>;
using effect_count = std::map<uint32, int32>;
class attacker_map : public std::unordered_map<uint16, std::pair<card*, uint32>> {
public:
void addcard(card* pcard);
......
......@@ -21,7 +21,7 @@ class interpreter;
class duel {
public:
typedef std::set<card*, card_sort> card_set;
using card_set = std::set<card*, card_sort>;
char strbuffer[256];
byte buffer[0x1000];
uint32 bufferlen;
......
......@@ -44,7 +44,7 @@ struct optarget {
int32 op_param;
};
struct chain {
typedef std::unordered_map<uint32, optarget> opmap;
using opmap = std::unordered_map<uint32, optarget>;
uint16 chain_id;
uint8 chain_count;
uint8 triggering_player;
......@@ -68,7 +68,7 @@ struct chain {
};
struct player_info {
typedef std::vector<card*> card_vector;
using card_vector = std::vector<card*>;
int32 lp;
int32 start_count;
int32 draw_count;
......@@ -88,12 +88,12 @@ struct player_info {
card_vector tag_list_extra;
};
struct field_effect {
typedef std::multimap<uint32, effect*> effect_container;
typedef std::unordered_map<effect*, effect_container::iterator> effect_indexer;
typedef std::unordered_map<effect*, effect*> oath_effects;
typedef std::unordered_set<effect*> effect_collection;
typedef std::unordered_map<card*, effect*> gain_effects;
typedef std::unordered_map<effect*, gain_effects> grant_effect_container;
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 effect_collection = std::unordered_set<effect*>;
using gain_effects = std::unordered_map<card*, effect*>;
using grant_effect_container = std::unordered_map<effect*, gain_effects>;
effect_container aura_effect;
effect_container ignition_effect;
......@@ -150,23 +150,23 @@ union return_value {
int64 lvalue[8];
};
struct processor {
typedef std::vector<effect*> effect_vector;
typedef std::vector<card*> card_vector;
typedef std::vector<uint32> option_vector;
typedef std::list<card*> card_list;
typedef std::list<tevent> event_list;
typedef std::list<chain> chain_list;
typedef std::map<effect*, chain> instant_f_list;
typedef std::vector<chain> chain_array;
typedef std::list<processor_unit> processor_list;
typedef std::set<card*, card_sort> card_set;
typedef std::set<std::pair<effect*, tevent>> delayed_effect_collection;
using effect_vector = std::vector<effect*>;
using card_vector = std::vector<card*>;
using option_vector = std::vector<uint32>;
using card_list = std::list<card*>;
using event_list = std::list<tevent>;
using chain_list = std::list<chain>;
using instant_f_list = std::map<effect*, chain>;
using chain_array = std::vector<chain>;
using processor_list = std::list<processor_unit>;
using card_set = std::set<card*, card_sort>;
using delayed_effect_collection = std::set<std::pair<effect*, tevent>>;
struct chain_limit_t {
chain_limit_t(int32 f, int32 p): function(f), player(p) {}
int32 function;
int32 player;
};
typedef std::vector<chain_limit_t> chain_limit_list;
using chain_limit_list = std::vector<chain_limit_t>;
processor_list units;
processor_list subunits;
......@@ -335,16 +335,16 @@ struct processor {
};
class field {
public:
typedef std::multimap<uint32, effect*> effect_container;
typedef std::set<card*, card_sort> card_set;
typedef std::vector<effect*> effect_vector;
typedef std::vector<card*> card_vector;
typedef std::list<card*> card_list;
typedef std::list<tevent> event_list;
typedef std::list<chain> chain_list;
typedef std::map<effect*, chain> instant_f_list;
typedef std::vector<chain> chain_array;
typedef std::list<processor_unit> processor_list;
using effect_container = std::multimap<uint32, effect*>;
using card_set = std::set<card*, card_sort>;
using effect_vector = std::vector<effect*>;
using card_vector = std::vector<card*>;
using card_list = std::list<card*>;
using event_list = std::list<tevent>;
using chain_list = std::list<chain>;
using instant_f_list = std::map<effect*, chain>;
using chain_array = std::vector<chain>;
using processor_list = std::list<processor_unit>;
duel* pduel;
player_info player[2];
......
......@@ -17,7 +17,7 @@ class duel;
class group {
public:
typedef std::set<card*, card_sort> card_set;
using card_set = std::set<card*, card_sort>;
int32 ref_handle;
duel* pduel;
card_set container;
......
......@@ -26,8 +26,8 @@ class duel;
class interpreter {
public:
typedef std::unordered_map<int32, lua_State*> coroutine_map;
typedef std::list<std::pair<void*, uint32>> param_list;
using coroutine_map = std::unordered_map<int32, lua_State*>;
using param_list = std::list<std::pair<void*, uint32>>;
duel* pduel;
char msgbuf[64];
......
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