Cosmetics

This commit is contained in:
Bertrand Songis
2020-02-10 21:45:52 +01:00
parent 04d4363607
commit 02810fc6ab
4 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -717,7 +717,7 @@ BitmapBuffer * BitmapBuffer::load_bmp(const char * filename)
uint32_t fsize = *((uint32_t *)&buf[2]);
uint32_t hsize = *((uint32_t *)&buf[10]); /* header size */
uint32_t len = limit((uint32_t)4, (uint32_t)(hsize-14), (uint32_t)32);
uint32_t len = limit<uint32_t>(4, hsize - 14, 32);
result = f_read(&imgFile, buf, len, &read);
if (result != FR_OK || read != len) {
f_close(&imgFile);
@@ -800,7 +800,7 @@ BitmapBuffer * BitmapBuffer::load_bmp(const char * filename)
switch (depth) {
case 32:
for (int i=h-1; i>=0; i--) {
for (int i = h-1; i >= 0; i--) {
pixel_t * dst = bmp->getPixelPtr(0, i);
for (unsigned int j=0; j<w; j++) {
uint32_t pixel;
@@ -904,7 +904,7 @@ void *stb_realloc(void *ptr, unsigned int oldsz, unsigned int newsz)
#include "thirdparty/Stb/stb_image.h"
// fill 'data' with 'size' bytes. return number of bytes actually read
int stbc_read(void *user, char *data, int size)
int stbc_read(void *user, char * data, int size)
{
FIL * fp = (FIL *)user;
UINT br = 0;
-1
View File
@@ -21,7 +21,6 @@
#define _BUTTON_H_
#include "form.h"
#include <string>
constexpr WindowFlags BUTTON_BACKGROUND = FORM_FLAGS_LAST << 1;
constexpr WindowFlags BUTTON_CHECKED = FORM_FLAGS_LAST << 2;
+1 -1
View File
@@ -81,7 +81,7 @@ bool MainWindow::refresh()
if (invalidatedRect.w) {
if (invalidatedRect.x > 0 || invalidatedRect.y > 0 || invalidatedRect.w < LCD_W || invalidatedRect.h < LCD_H) {
TRACE_WINDOWS("Refresh rect: left=%d top=%d width=%d height=%d", invalidatedRect.left(), invalidatedRect.top(), invalidatedRect.w, invalidatedRect.h);
BitmapBuffer * previous = lcd;
const BitmapBuffer * previous = lcd;
lcdNextLayer();
lcdCopy(lcd->getData(), previous->getData());
}
+3 -2
View File
@@ -21,11 +21,12 @@
#define _WINDOW_H_
#include <stdlib.h>
#include <list>
#include <stdio.h>
#include <string.h>
#include <list>
#include <string>
#include <utility>
#include <functional>
#include <string>
#include "bitmapbuffer.h"
#include "libopenui_defines.h"
#include "libopenui_helpers.h"