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
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
YGOPRO-520DIY
ygopro
Commits
8763c49e
Commit
8763c49e
authored
May 28, 2024
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use memcpy in GetPosition
parent
57741bb6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
gframe/network.h
gframe/network.h
+6
-0
gframe/single_duel.cpp
gframe/single_duel.cpp
+0
-4
gframe/tag_duel.cpp
gframe/tag_duel.cpp
+0
-4
No files found.
gframe/network.h
View file @
8763c49e
...
@@ -125,6 +125,12 @@ inline bool check_msg_size(int size) {
...
@@ -125,6 +125,12 @@ inline bool check_msg_size(int size) {
return
true
;
return
true
;
}
}
inline
unsigned
int
GetPosition
(
unsigned
char
*
qbuf
,
int
offset
)
{
unsigned
int
info
=
0
;
std
::
memcpy
(
&
info
,
qbuf
+
offset
,
sizeof
info
);
return
info
>>
24
;
}
class
DuelMode
{
class
DuelMode
{
public:
public:
virtual
~
DuelMode
()
{}
virtual
~
DuelMode
()
{}
...
...
gframe/single_duel.cpp
View file @
8763c49e
...
@@ -1480,10 +1480,6 @@ inline int SingleDuel::WriteUpdateData(int& player, int location, int& flag, uns
...
@@ -1480,10 +1480,6 @@ inline int SingleDuel::WriteUpdateData(int& player, int location, int& flag, uns
int
len
=
query_field_card
(
pduel
,
player
,
location
,
flag
,
qbuf
,
use_cache
);
int
len
=
query_field_card
(
pduel
,
player
,
location
,
flag
,
qbuf
,
use_cache
);
return
len
;
return
len
;
}
}
inline
unsigned
int
GetPosition
(
unsigned
char
*&
qbuf
,
int
offset
)
{
unsigned
int
info
=
*
(
unsigned
int
*
)(
qbuf
+
offset
);
return
info
>>
24
;
}
void
SingleDuel
::
RefreshMzone
(
int
player
,
int
flag
,
int
use_cache
)
{
void
SingleDuel
::
RefreshMzone
(
int
player
,
int
flag
,
int
use_cache
)
{
std
::
vector
<
unsigned
char
>
query_buffer
;
std
::
vector
<
unsigned
char
>
query_buffer
;
query_buffer
.
resize
(
SIZE_QUERY_BUFFER
);
query_buffer
.
resize
(
SIZE_QUERY_BUFFER
);
...
...
gframe/tag_duel.cpp
View file @
8763c49e
...
@@ -1602,10 +1602,6 @@ inline int TagDuel::WriteUpdateData(int& player, int location, int& flag, unsign
...
@@ -1602,10 +1602,6 @@ inline int TagDuel::WriteUpdateData(int& player, int location, int& flag, unsign
int
len
=
query_field_card
(
pduel
,
player
,
location
,
flag
,
qbuf
,
use_cache
);
int
len
=
query_field_card
(
pduel
,
player
,
location
,
flag
,
qbuf
,
use_cache
);
return
len
;
return
len
;
}
}
inline
unsigned
int
GetPosition
(
unsigned
char
*&
qbuf
,
int
offset
)
{
unsigned
int
info
=
*
(
unsigned
int
*
)(
qbuf
+
offset
);
return
info
>>
24
;
}
void
TagDuel
::
RefreshMzone
(
int
player
,
int
flag
,
int
use_cache
)
{
void
TagDuel
::
RefreshMzone
(
int
player
,
int
flag
,
int
use_cache
)
{
std
::
vector
<
unsigned
char
>
query_buffer
;
std
::
vector
<
unsigned
char
>
query_buffer
;
query_buffer
.
resize
(
SIZE_QUERY_BUFFER
);
query_buffer
.
resize
(
SIZE_QUERY_BUFFER
);
...
...
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