Merge pull request #70368 from pfertyk/issue-70187-bit-map-resize-spams-errors
Fix `BitMap.resize` error spam
This commit is contained in:
commit
7a46f61089
1 changed files with 2 additions and 2 deletions
|
@ -606,8 +606,8 @@ void BitMap::resize(const Size2 &p_new_size) {
|
||||||
Ref<BitMap> new_bitmap;
|
Ref<BitMap> new_bitmap;
|
||||||
new_bitmap.instance();
|
new_bitmap.instance();
|
||||||
new_bitmap->create(p_new_size);
|
new_bitmap->create(p_new_size);
|
||||||
int lw = MIN(width, p_new_size.width);
|
int lw = MIN(width, new_bitmap->width);
|
||||||
int lh = MIN(height, p_new_size.height);
|
int lh = MIN(height, new_bitmap->height);
|
||||||
for (int x = 0; x < lw; x++) {
|
for (int x = 0; x < lw; x++) {
|
||||||
for (int y = 0; y < lh; y++) {
|
for (int y = 0; y < lh; y++) {
|
||||||
new_bitmap->set_bit(Vector2(x, y), get_bit(Vector2(x, y)));
|
new_bitmap->set_bit(Vector2(x, y), get_bit(Vector2(x, y)));
|
||||||
|
|
Loading…
Reference in a new issue