Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
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
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
MyCard
ygopro
Commits
9458fd09
Commit
9458fd09
authored
Dec 19, 2023
by
Chen Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ClientField: add destructor
parent
b21d5dc6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
gframe/client_field.cpp
gframe/client_field.cpp
+39
-0
gframe/client_field.h
gframe/client_field.h
+1
-0
No files found.
gframe/client_field.cpp
View file @
9458fd09
...
...
@@ -17,6 +17,45 @@ ClientField::ClientField() {
}
rnd
.
reset
((
uint_fast32_t
)
std
::
random_device
()());
}
ClientField
::~
ClientField
()
{
for
(
int
i
=
0
;
i
<
2
;
++
i
)
{
for
(
auto
card
:
deck
[
i
])
{
delete
card
;
}
deck
[
i
].
clear
();
for
(
auto
card
:
hand
[
i
])
{
delete
card
;
}
hand
[
i
].
clear
();
for
(
auto
card
:
mzone
[
i
])
{
if
(
card
)
delete
card
;
card
=
nullptr
;
}
for
(
auto
card
:
szone
[
i
])
{
if
(
card
)
delete
card
;
card
=
nullptr
;
}
for
(
auto
card
:
grave
[
i
])
{
delete
card
;
}
grave
[
i
].
clear
();
for
(
auto
card
:
remove
[
i
])
{
delete
card
;
}
remove
[
i
].
clear
();
for
(
auto
card
:
extra
[
i
])
{
delete
card
;
}
extra
[
i
].
clear
();
}
for
(
auto
card
:
overlay_cards
)
{
delete
card
;
}
overlay_cards
.
clear
();
}
void
ClientField
::
Clear
()
{
for
(
int
i
=
0
;
i
<
2
;
++
i
)
{
for
(
auto
cit
=
deck
[
i
].
begin
();
cit
!=
deck
[
i
].
end
();
++
cit
)
...
...
gframe/client_field.h
View file @
9458fd09
...
...
@@ -88,6 +88,7 @@ public:
mt19937
rnd
;
ClientField
();
~
ClientField
();
void
Clear
();
void
Initial
(
int
player
,
int
deckc
,
int
extrac
);
ClientCard
*
GetCard
(
int
controler
,
int
location
,
int
sequence
,
int
sub_seq
=
0
);
...
...
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