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
c40eed7e
You need to sign in or sign up before continuing.
Commit
c40eed7e
authored
May 29, 2024
by
salix5
Committed by
GitHub
May 29, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add sort.h (#593)
fix struct card_sort::operator()
parent
5dfde49d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
6 deletions
+14
-6
card.cpp
card.cpp
+1
-3
card.h
card.h
+1
-0
common.h
common.h
+0
-3
duel.h
duel.h
+1
-0
group.h
group.h
+1
-0
sort.h
sort.h
+10
-0
No files found.
card.cpp
View file @
c40eed7e
...
@@ -23,9 +23,7 @@ const std::unordered_map<uint32, uint32> card::second_code = {
...
@@ -23,9 +23,7 @@ const std::unordered_map<uint32, uint32> card::second_code = {
{
CARD_HERMOS
,
10000070u
}
{
CARD_HERMOS
,
10000070u
}
};
};
bool
card_sort
::
operator
()(
void
*
const
&
p1
,
void
*
const
&
p2
)
const
{
bool
card_sort
::
operator
()(
card
*
const
&
c1
,
card
*
const
&
c2
)
const
{
card
*
c1
=
(
card
*
)
p1
;
card
*
c2
=
(
card
*
)
p2
;
return
c1
->
cardid
<
c2
->
cardid
;
return
c1
->
cardid
<
c2
->
cardid
;
}
}
bool
card_state
::
is_location
(
int32
loc
)
const
{
bool
card_state
::
is_location
(
int32
loc
)
const
{
...
...
card.h
View file @
c40eed7e
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
#include "common.h"
#include "common.h"
#include "effectset.h"
#include "effectset.h"
#include "card_data.h"
#include "card_data.h"
#include "sort.h"
#include <set>
#include <set>
#include <map>
#include <map>
#include <unordered_set>
#include <unordered_set>
...
...
common.h
View file @
c40eed7e
...
@@ -42,9 +42,6 @@ typedef signed char int8;
...
@@ -42,9 +42,6 @@ typedef signed char int8;
#ifndef NULL
#ifndef NULL
#define NULL 0
#define NULL 0
#endif
#endif
struct
card_sort
{
bool
operator
()(
void
*
const
&
c1
,
void
*
const
&
c2
)
const
;
};
#define CURRENT_RULE 5
#define CURRENT_RULE 5
...
...
duel.h
View file @
c40eed7e
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#define DUEL_H_
#define DUEL_H_
#include "common.h"
#include "common.h"
#include "sort.h"
#include "mtrandom.h"
#include "mtrandom.h"
#include <set>
#include <set>
#include <unordered_set>
#include <unordered_set>
...
...
group.h
View file @
c40eed7e
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#define GROUP_H_
#define GROUP_H_
#include "common.h"
#include "common.h"
#include "sort.h"
#include <set>
#include <set>
#include <list>
#include <list>
...
...
sort.h
0 → 100644
View file @
c40eed7e
#ifndef SORT_H_
#define SORT_H_
class
card
;
struct
card_sort
{
bool
operator
()(
card
*
const
&
c1
,
card
*
const
&
c2
)
const
;
};
#endif
/* SORT_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