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
1957d694
Commit
1957d694
authored
Jan 07, 2026
by
salix5
Committed by
GitHub
Jan 07, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update buffer_write and vector_write (#809)
parent
2d2e322d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
buffer.h
buffer.h
+3
-3
No files found.
buffer.h
View file @
1957d694
...
...
@@ -22,7 +22,7 @@ inline void buffer_write_block(unsigned char*& p, const void* src, size_t size)
p
+=
size
;
}
template
<
typename
T
>
inline
void
buffer_write
(
unsigned
char
*&
p
,
T
value
)
{
inline
void
buffer_write
(
unsigned
char
*&
p
,
const
T
&
value
)
{
std
::
memcpy
(
p
,
&
value
,
sizeof
(
T
));
p
+=
sizeof
(
T
);
}
...
...
@@ -30,10 +30,10 @@ inline void buffer_write(unsigned char*& p, T value) {
inline
void
vector_write_block
(
std
::
vector
<
unsigned
char
>&
buffer
,
const
void
*
src
,
size_t
size
)
{
const
auto
len
=
buffer
.
size
();
buffer
.
resize
(
len
+
size
);
std
::
memcpy
(
&
buffer
[
len
]
,
src
,
size
);
std
::
memcpy
(
buffer
.
data
()
+
len
,
src
,
size
);
}
template
<
typename
T
>
inline
void
vector_write
(
std
::
vector
<
unsigned
char
>&
buffer
,
T
value
)
{
inline
void
vector_write
(
std
::
vector
<
unsigned
char
>&
buffer
,
const
T
&
value
)
{
vector_write_block
(
buffer
,
&
value
,
sizeof
(
T
));
}
...
...
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