summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2020-05-13 13:09:56 +0100
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2020-05-14 15:24:17 +0100
commit6c4c1bf53d9796c5f2cf7a9b430b32202c8f69f6 (patch)
tree425488151a2139924a607721a15e3e9bbcd3eab9 /core
parent27b4915fa8aaa3b60386105a2c8f3ae62bf21a9a (diff)
Silence 'w' may be used uninitialized in image.cpp warning.
Rename `w` to the more meaningful `data_write`
Diffstat (limited to 'core')
-rw-r--r--core/image.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/image.cpp b/core/image.cpp
index c88ed7e3cb..c106a0f524 100644
--- a/core/image.cpp
+++ b/core/image.cpp
@@ -2055,7 +2055,7 @@ void Image::create(const char **p_xpm) {
HashMap<String, Color> colormap;
int colormap_size = 0;
uint32_t pixel_size = 0;
- uint8_t *w;
+ uint8_t *data_write = nullptr;
while (status != DONE) {
@@ -2158,7 +2158,7 @@ void Image::create(const char **p_xpm) {
status = READING_PIXELS;
create(size_width, size_height, false, has_alpha ? FORMAT_RGBA8 : FORMAT_RGB8);
- w = data.ptrw();
+ data_write = data.ptrw();
pixel_size = has_alpha ? 4 : 3;
}
} break;
@@ -2177,7 +2177,7 @@ void Image::create(const char **p_xpm) {
for (uint32_t i = 0; i < pixel_size; i++) {
pixel[i] = CLAMP((*colorptr)[i] * 255, 0, 255);
}
- _put_pixelb(x, y, pixel_size, w, pixel);
+ _put_pixelb(x, y, pixel_size, data_write, pixel);
}
if (y == (size_height - 1))