QDENGINE: Fix pointless assignment. PVS-Studio V1048

This commit is contained in:
Eugene Sandulenko 2024-08-25 00:12:07 +02:00
parent 496e90df96
commit 671f9c56ea
No known key found for this signature in database
GPG Key ID: 014D387312D34F08

View File

@ -144,7 +144,7 @@ qdSprite &qdSprite::operator = (const qdSprite &spr) {
delete [] _data;
if (spr._data) {
int ssx = 2;
int ssx;
switch (_format) {
case GR_RGB565:
case GR_ARGB1555:
@ -159,6 +159,9 @@ qdSprite &qdSprite::operator = (const qdSprite &spr) {
case GR_ARGB8888:
ssx = 4;
break;
default:
ssx = 2;
break;
}
_data = new byte[_picture_size.x * _picture_size.y * ssx];