Skip to content

Commit

Permalink
Avoid unneccessary object allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
ACrazyTown committed Dec 12, 2024
1 parent 824da26 commit 9921b9d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions project/src/ExternalInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2052,8 +2052,13 @@ namespace lime {

} else {

Vector2 tempPoint = Vector2(0, 0);
Vector2* _alphaPoint = alphaPoint ? alphaPoint : &tempPoint;
Vector2* _alphaPoint = alphaPoint;
if (!_alphaPoint) {

Vector2 tempAlphaPoint = Vector2(0, 0);
_alphaPoint = &tempAlphaPoint;

}

ImageDataUtil::CopyPixels (image, sourceImage, sourceRect, destPoint, alphaImage, _alphaPoint, mergeAlpha);
}
Expand Down

0 comments on commit 9921b9d

Please sign in to comment.