flatten 20260225
This commit is contained in:
16
tjp/core/endian/Endian.cpp
Executable file
16
tjp/core/endian/Endian.cpp
Executable file
@@ -0,0 +1,16 @@
|
||||
// TJP COPYRIGHT HEADER
|
||||
|
||||
#include "Endian.h"
|
||||
|
||||
using namespace tjp::core;
|
||||
|
||||
void endian::swap (char *buffer, int size)
|
||||
{
|
||||
int i, j;
|
||||
for (i = 0, j = size-1 ; i < size/2; ++i, --j)
|
||||
{
|
||||
char switcheroo = buffer[i];
|
||||
buffer[i] = buffer[j];
|
||||
buffer[j] = switcheroo;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user