summaryrefslogtreecommitdiff
path: root/modules/bmp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-06-20 21:10:10 +0200
committerGitHub <noreply@github.com>2019-06-20 21:10:10 +0200
commit5c66771e3ebccdfec55bb94ea521d2f24cb6200a (patch)
tree80bea3ee8792cb19e719221987faf1a2bf1e88a3 /modules/bmp
parent7b88ac08437d3bd062efcbdd40c215b533032412 (diff)
parent072e40368e19e0f88ec1fbb61fe463a6fffcca36 (diff)
Merge pull request #29283 from qarmin/fix_some_always_same_values
Remove always true/false values
Diffstat (limited to 'modules/bmp')
-rw-r--r--modules/bmp/image_loader_bmp.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/bmp/image_loader_bmp.cpp b/modules/bmp/image_loader_bmp.cpp
index bcc992db24..b4530c2df1 100644
--- a/modules/bmp/image_loader_bmp.cpp
+++ b/modules/bmp/image_loader_bmp.cpp
@@ -261,12 +261,10 @@ Error ImageLoaderBMP::load_image(Ref<Image> p_image, FileAccess *f,
ERR_FAIL_COND_V(color_table_size == 0, ERR_BUG);
PoolVector<uint8_t> bmp_color_table;
- if (color_table_size > 0) {
- // Color table is usually 4 bytes per color -> [B][G][R][0]
- err = bmp_color_table.resize(color_table_size * 4);
- PoolVector<uint8_t>::Write bmp_color_table_w = bmp_color_table.write();
- f->get_buffer(bmp_color_table_w.ptr(), color_table_size * 4);
- }
+ // Color table is usually 4 bytes per color -> [B][G][R][0]
+ err = bmp_color_table.resize(color_table_size * 4);
+ PoolVector<uint8_t>::Write bmp_color_table_w = bmp_color_table.write();
+ f->get_buffer(bmp_color_table_w.ptr(), color_table_size * 4);
f->seek(bmp_header.bmp_file_header.bmp_file_offset);