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
80179d88
Commit
80179d88
authored
Jul 21, 2021
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update struct effect_set_v
parent
690afddc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
effectset.h
effectset.h
+10
-13
No files found.
effectset.h
View file @
80179d88
...
...
@@ -70,50 +70,47 @@ private:
};
struct
effect_set_v
{
effect_set_v
()
:
count
(
0
)
{}
effect_set_v
()
{}
void
add_item
(
effect
*
peffect
)
{
container
.
push_back
(
peffect
);
count
++
;
}
void
remove_item
(
int
index
)
{
if
(
index
>=
count
)
if
(
index
>=
(
int
)
container
.
size
()
)
return
;
container
.
erase
(
container
.
begin
()
+
index
);
count
--
;
}
void
clear
()
{
container
.
clear
();
count
=
0
;
}
int
size
()
const
{
return
count
;
return
(
int
)
container
.
size
()
;
}
void
sort
()
{
int
count
=
(
int
)
container
.
size
();
if
(
count
<
2
)
return
;
std
::
sort
(
container
.
begin
(),
container
.
begin
()
+
count
,
effect_sort_id
);
}
effect
*
const
&
get_last
()
const
{
return
container
[
count
-
1
]
;
return
container
.
back
()
;
}
effect
*&
get_last
()
{
return
container
[
count
-
1
]
;
return
container
.
back
()
;
}
effect
*
const
&
operator
[]
(
int
index
)
const
{
return
container
[
index
]
;
return
container
.
at
(
index
)
;
}
effect
*&
operator
[]
(
int
index
)
{
return
container
[
index
]
;
return
container
.
at
(
index
)
;
}
effect
*
const
&
at
(
int
index
)
const
{
return
container
[
index
]
;
return
container
.
at
(
index
)
;
}
effect
*&
at
(
int
index
)
{
return
container
[
index
]
;
return
container
.
at
(
index
)
;
}
private:
std
::
vector
<
effect
*>
container
;
int
count
;
};
#endif //EFFECTSET_H_
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