Skip to content

Commit 1a0b019

Browse files
committed
test: do not use mempcpy in BufferGPerfTest
Function `mempcpy` is a GNU extension and is not available on some platforms like MacOS. And, actually, `mempcpy` is the same as `memcpy`, the only difference is returned value, and it's not even used in the code that calls the function. So let's simply replace it with `memcpy`.
1 parent 8e009e8 commit 1a0b019

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/BufferGPerfTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ struct StaticBuffer {
7171
template <class T>
7272
void write(T&& t)
7373
{
74-
mempcpy(p, &t, sizeof(t));
74+
memcpy(p, &t, sizeof(t));
7575
p += sizeof(t);
7676
}
7777
void write(WData d)
7878
{
79-
mempcpy(p, d.data, d.size);
79+
memcpy(p, d.data, d.size);
8080
p += d.size;
8181
}
8282
};

0 commit comments

Comments
 (0)