spelling, naming, warnings
This commit is contained in:
parent
9554b4d674
commit
333c75d34b
|
@ -11,7 +11,7 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
void copyRange(uint8_t* destination, FragmentList src, size_t skip, size_t size) {
|
void copyRange(uint8_t* destination, FragmentList src, size_t skip, size_t size) {
|
||||||
int fragmentIndex = 0;
|
size_t fragmentIndex = 0;
|
||||||
|
|
||||||
// Find which fragment to start - skip any full fragments smaller than `skip` parameter
|
// Find which fragment to start - skip any full fragments smaller than `skip` parameter
|
||||||
while (skip > src.fragments[fragmentIndex].size && fragmentIndex <= src.count) {
|
while (skip > src.fragments[fragmentIndex].size && fragmentIndex <= src.count) {
|
||||||
|
@ -19,7 +19,7 @@ void copyRange(uint8_t* destination, FragmentList src, size_t skip, size_t size)
|
||||||
fragmentIndex++;
|
fragmentIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
int destinationIndex = 0;
|
size_t destinationIndex = 0;
|
||||||
|
|
||||||
while (size > 0) {
|
while (size > 0) {
|
||||||
if (fragmentIndex >= src.count) {
|
if (fragmentIndex >= src.count) {
|
||||||
|
|
|
@ -27,7 +27,7 @@ static void resetBuffer() {
|
||||||
memset(buffer, 0xFF, sizeof(buffer));
|
memset(buffer, 0xFF, sizeof(buffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(outputs, fragments) {
|
TEST(Util_Fragments, fragments) {
|
||||||
static_assert(4 == efi::size(fragmentBuffer));
|
static_assert(4 == efi::size(fragmentBuffer));
|
||||||
|
|
||||||
FragmentList fragments{ fragmentBuffer, efi::size(fragmentBuffer) };
|
FragmentList fragments{ fragmentBuffer, efi::size(fragmentBuffer) };
|
||||||
|
|
|
@ -8,6 +8,6 @@ RUSEFI_LIB_CPP += \
|
||||||
|
|
||||||
RUSEFI_LIB_CPP_TEST += \
|
RUSEFI_LIB_CPP_TEST += \
|
||||||
$(RUSEFI_LIB)/util/test/test_arrays.cpp \
|
$(RUSEFI_LIB)/util/test/test_arrays.cpp \
|
||||||
$(RUSEFI_LIB)/util/test/test_framgents.cpp \
|
$(RUSEFI_LIB)/util/test/test_fragments.cpp \
|
||||||
$(RUSEFI_LIB)/util/test/test_math.cpp \
|
$(RUSEFI_LIB)/util/test/test_math.cpp \
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue