diff --git a/radio/src/thirdparty/libopenui/src/bitmapbuffer.cpp b/radio/src/thirdparty/libopenui/src/bitmapbuffer.cpp index 303eb350b..20e42c70c 100755 --- a/radio/src/thirdparty/libopenui/src/bitmapbuffer.cpp +++ b/radio/src/thirdparty/libopenui/src/bitmapbuffer.cpp @@ -901,7 +901,6 @@ void *stb_realloc(void *ptr, unsigned int oldsz, unsigned int newsz) } #endif // #if defined(TRACE_STB_MALLOC) -#include "memcpy.h" #include "thirdparty/Stb/stb_image.h" // fill 'data' with 'size' bytes. return number of bytes actually read diff --git a/radio/src/thirdparty/libopenui/src/bitmapbuffer.h b/radio/src/thirdparty/libopenui/src/bitmapbuffer.h index d49225f07..f238a312a 100755 --- a/radio/src/thirdparty/libopenui/src/bitmapbuffer.h +++ b/radio/src/thirdparty/libopenui/src/bitmapbuffer.h @@ -249,7 +249,7 @@ class BitmapBuffer: public BitmapBufferBase , leakReported(false) #endif { - data = (uint16_t *)malloc(width*height*sizeof(uint16_t)); + data = (uint16_t *)malloc(width * height * sizeof(uint16_t)); data_end = data + (width * height); } diff --git a/radio/src/thirdparty/libopenui/src/memcpy.h b/radio/src/thirdparty/libopenui/src/memcpy.h deleted file mode 100644 index 21aaf1417..000000000 --- a/radio/src/thirdparty/libopenui/src/memcpy.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) OpenTX - * - * Source: - * https://github.com/opentx/libopenui - * - * This file is a part of libopenui library. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - */ - -#ifndef _MEMCPY_H_ -#define _MEMCPY_H_ - -#include - -#if !defined(SIMU) - -inline void safeMemcpy(void * dest, const void * src, unsigned int size) -{ - if (((uint32_t)dest & 0x03) || ((uint32_t)src & 0x03)) { - for (unsigned i = 0; i < size; i++) { - ((uint8_t *)dest)[i] = ((uint8_t *)src)[i]; - } - } - else { - memcpy(dest, src, size); - } -} - -#define memcpy safeMemcpy - -#endif - -#endif // _HELPERS_H_