Refactor, improved readability

This commit is contained in:
Andrew
2023-06-01 16:09:22 +03:00
parent 3999ed0996
commit f5423a8eb0
12 changed files with 548 additions and 464 deletions

14
util.cpp Normal file
View File

@@ -0,0 +1,14 @@
//
// Created by Andrew on 01/06/2023.
//
#include "header.h"
/* Convert data between endianness types. */
void endian(byte *data, int length) {
for (int i = 0; i < length / 2; i++) {
byte temp = data[i];
data[i] = data[length - i - 1];
data[length - i - 1] = temp;
}
}