Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
ygopro-core
Commits
0f6b3dd5
Commit
0f6b3dd5
authored
Jan 26, 2020
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modernize: use using instead of typedef
parent
044311cf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
42 deletions
+42
-42
card.h
card.h
+8
-8
duel.h
duel.h
+1
-1
field.h
field.h
+30
-30
group.h
group.h
+1
-1
interpreter.h
interpreter.h
+2
-2
No files found.
card.h
View file @
0f6b3dd5
...
@@ -94,14 +94,14 @@ public:
...
@@ -94,14 +94,14 @@ public:
return
std
::
hash
<
uint16
>
()(
v
.
second
);
return
std
::
hash
<
uint16
>
()(
v
.
second
);
}
}
};
};
typedef
std
::
vector
<
card
*>
card_vector
;
using
card_vector
=
std
::
vector
<
card
*>
;
typedef
std
::
multimap
<
uint32
,
effect
*>
effect_container
;
using
effect_container
=
std
::
multimap
<
uint32
,
effect
*>
;
typedef
std
::
set
<
card
*
,
card_sort
>
card_set
;
using
card_set
=
std
::
set
<
card
*
,
card_sort
>
;
typedef
std
::
unordered_map
<
effect
*
,
effect_container
::
iterator
>
effect_indexer
;
using
effect_indexer
=
std
::
unordered_map
<
effect
*
,
effect_container
::
iterator
>
;
typedef
std
::
unordered_set
<
std
::
pair
<
effect
*
,
uint16
>
,
effect_relation_hash
>
effect_relation
;
using
effect_relation
=
std
::
unordered_set
<
std
::
pair
<
effect
*
,
uint16
>
,
effect_relation_hash
>
;
typedef
std
::
unordered_map
<
card
*
,
uint32
>
relation_map
;
using
relation_map
=
std
::
unordered_map
<
card
*
,
uint32
>
;
typedef
std
::
map
<
uint16
,
std
::
array
<
uint16
,
2
>>
counter_map
;
using
counter_map
=
std
::
map
<
uint16
,
std
::
array
<
uint16
,
2
>>
;
typedef
std
::
map
<
uint32
,
int32
>
effect_count
;
using
effect_count
=
std
::
map
<
uint32
,
int32
>
;
class
attacker_map
:
public
std
::
unordered_map
<
uint16
,
std
::
pair
<
card
*
,
uint32
>>
{
class
attacker_map
:
public
std
::
unordered_map
<
uint16
,
std
::
pair
<
card
*
,
uint32
>>
{
public:
public:
void
addcard
(
card
*
pcard
);
void
addcard
(
card
*
pcard
);
...
...
duel.h
View file @
0f6b3dd5
...
@@ -21,7 +21,7 @@ class interpreter;
...
@@ -21,7 +21,7 @@ class interpreter;
class
duel
{
class
duel
{
public:
public:
typedef
std
::
set
<
card
*
,
card_sort
>
card_set
;
using
card_set
=
std
::
set
<
card
*
,
card_sort
>
;
char
strbuffer
[
256
];
char
strbuffer
[
256
];
byte
buffer
[
0x1000
];
byte
buffer
[
0x1000
];
uint32
bufferlen
;
uint32
bufferlen
;
...
...
field.h
View file @
0f6b3dd5
...
@@ -44,7 +44,7 @@ struct optarget {
...
@@ -44,7 +44,7 @@ struct optarget {
int32
op_param
;
int32
op_param
;
};
};
struct
chain
{
struct
chain
{
typedef
std
::
unordered_map
<
uint32
,
optarget
>
opmap
;
using
opmap
=
std
::
unordered_map
<
uint32
,
optarget
>
;
uint16
chain_id
;
uint16
chain_id
;
uint8
chain_count
;
uint8
chain_count
;
uint8
triggering_player
;
uint8
triggering_player
;
...
@@ -68,7 +68,7 @@ struct chain {
...
@@ -68,7 +68,7 @@ struct chain {
};
};
struct
player_info
{
struct
player_info
{
typedef
std
::
vector
<
card
*>
card_vector
;
using
card_vector
=
std
::
vector
<
card
*>
;
int32
lp
;
int32
lp
;
int32
start_count
;
int32
start_count
;
int32
draw_count
;
int32
draw_count
;
...
@@ -88,12 +88,12 @@ struct player_info {
...
@@ -88,12 +88,12 @@ struct player_info {
card_vector
tag_list_extra
;
card_vector
tag_list_extra
;
};
};
struct
field_effect
{
struct
field_effect
{
typedef
std
::
multimap
<
uint32
,
effect
*>
effect_container
;
using
effect_container
=
std
::
multimap
<
uint32
,
effect
*>
;
typedef
std
::
unordered_map
<
effect
*
,
effect_container
::
iterator
>
effect_indexer
;
using
effect_indexer
=
std
::
unordered_map
<
effect
*
,
effect_container
::
iterator
>
;
typedef
std
::
unordered_map
<
effect
*
,
effect
*>
oath_effects
;
using
oath_effects
=
std
::
unordered_map
<
effect
*
,
effect
*>
;
typedef
std
::
unordered_set
<
effect
*>
effect_collection
;
using
effect_collection
=
std
::
unordered_set
<
effect
*>
;
typedef
std
::
unordered_map
<
card
*
,
effect
*>
gain_effects
;
using
gain_effects
=
std
::
unordered_map
<
card
*
,
effect
*>
;
typedef
std
::
unordered_map
<
effect
*
,
gain_effects
>
grant_effect_container
;
using
grant_effect_container
=
std
::
unordered_map
<
effect
*
,
gain_effects
>
;
effect_container
aura_effect
;
effect_container
aura_effect
;
effect_container
ignition_effect
;
effect_container
ignition_effect
;
...
@@ -150,23 +150,23 @@ union return_value {
...
@@ -150,23 +150,23 @@ union return_value {
int64
lvalue
[
8
];
int64
lvalue
[
8
];
};
};
struct
processor
{
struct
processor
{
typedef
std
::
vector
<
effect
*>
effect_vector
;
using
effect_vector
=
std
::
vector
<
effect
*>
;
typedef
std
::
vector
<
card
*>
card_vector
;
using
card_vector
=
std
::
vector
<
card
*>
;
typedef
std
::
vector
<
uint32
>
option_vector
;
using
option_vector
=
std
::
vector
<
uint32
>
;
typedef
std
::
list
<
card
*>
card_list
;
using
card_list
=
std
::
list
<
card
*>
;
typedef
std
::
list
<
tevent
>
event_list
;
using
event_list
=
std
::
list
<
tevent
>
;
typedef
std
::
list
<
chain
>
chain_list
;
using
chain_list
=
std
::
list
<
chain
>
;
typedef
std
::
map
<
effect
*
,
chain
>
instant_f_list
;
using
instant_f_list
=
std
::
map
<
effect
*
,
chain
>
;
typedef
std
::
vector
<
chain
>
chain_array
;
using
chain_array
=
std
::
vector
<
chain
>
;
typedef
std
::
list
<
processor_unit
>
processor_list
;
using
processor_list
=
std
::
list
<
processor_unit
>
;
typedef
std
::
set
<
card
*
,
card_sort
>
card_set
;
using
card_set
=
std
::
set
<
card
*
,
card_sort
>
;
typedef
std
::
set
<
std
::
pair
<
effect
*
,
tevent
>>
delayed_effect_collection
;
using
delayed_effect_collection
=
std
::
set
<
std
::
pair
<
effect
*
,
tevent
>>
;
struct
chain_limit_t
{
struct
chain_limit_t
{
chain_limit_t
(
int32
f
,
int32
p
)
:
function
(
f
),
player
(
p
)
{}
chain_limit_t
(
int32
f
,
int32
p
)
:
function
(
f
),
player
(
p
)
{}
int32
function
;
int32
function
;
int32
player
;
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
units
;
processor_list
subunits
;
processor_list
subunits
;
...
@@ -335,16 +335,16 @@ struct processor {
...
@@ -335,16 +335,16 @@ struct processor {
};
};
class
field
{
class
field
{
public:
public:
typedef
std
::
multimap
<
uint32
,
effect
*>
effect_container
;
using
effect_container
=
std
::
multimap
<
uint32
,
effect
*>
;
typedef
std
::
set
<
card
*
,
card_sort
>
card_set
;
using
card_set
=
std
::
set
<
card
*
,
card_sort
>
;
typedef
std
::
vector
<
effect
*>
effect_vector
;
using
effect_vector
=
std
::
vector
<
effect
*>
;
typedef
std
::
vector
<
card
*>
card_vector
;
using
card_vector
=
std
::
vector
<
card
*>
;
typedef
std
::
list
<
card
*>
card_list
;
using
card_list
=
std
::
list
<
card
*>
;
typedef
std
::
list
<
tevent
>
event_list
;
using
event_list
=
std
::
list
<
tevent
>
;
typedef
std
::
list
<
chain
>
chain_list
;
using
chain_list
=
std
::
list
<
chain
>
;
typedef
std
::
map
<
effect
*
,
chain
>
instant_f_list
;
using
instant_f_list
=
std
::
map
<
effect
*
,
chain
>
;
typedef
std
::
vector
<
chain
>
chain_array
;
using
chain_array
=
std
::
vector
<
chain
>
;
typedef
std
::
list
<
processor_unit
>
processor_list
;
using
processor_list
=
std
::
list
<
processor_unit
>
;
duel
*
pduel
;
duel
*
pduel
;
player_info
player
[
2
];
player_info
player
[
2
];
...
...
group.h
View file @
0f6b3dd5
...
@@ -17,7 +17,7 @@ class duel;
...
@@ -17,7 +17,7 @@ class duel;
class
group
{
class
group
{
public:
public:
typedef
std
::
set
<
card
*
,
card_sort
>
card_set
;
using
card_set
=
std
::
set
<
card
*
,
card_sort
>
;
int32
ref_handle
;
int32
ref_handle
;
duel
*
pduel
;
duel
*
pduel
;
card_set
container
;
card_set
container
;
...
...
interpreter.h
View file @
0f6b3dd5
...
@@ -26,8 +26,8 @@ class duel;
...
@@ -26,8 +26,8 @@ class duel;
class
interpreter
{
class
interpreter
{
public:
public:
typedef
std
::
unordered_map
<
int32
,
lua_State
*>
coroutine_map
;
using
coroutine_map
=
std
::
unordered_map
<
int32
,
lua_State
*>
;
typedef
std
::
list
<
std
::
pair
<
void
*
,
uint32
>>
param_list
;
using
param_list
=
std
::
list
<
std
::
pair
<
void
*
,
uint32
>>
;
duel
*
pduel
;
duel
*
pduel
;
char
msgbuf
[
64
];
char
msgbuf
[
64
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment