Skip to content

Commit

Permalink
Merge pull request #2187 from vpop/update/redundant-nullcheck
Browse files Browse the repository at this point in the history
Remove nullcheck for known non-null variable
  • Loading branch information
almic authored Oct 28, 2018
2 parents 5030b36 + e5d03ba commit 129ad15
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ public void draw(Canvas canvas, float posX, float posY) {
float width = mSize.width;
float height = mSize.height;

if (width == 0.f && mDrawable != null) {
if (width == 0.f) {
width = mDrawable.getIntrinsicWidth();
}
if (height == 0.f && mDrawable != null) {
if (height == 0.f) {
height = mDrawable.getIntrinsicHeight();
}

Expand Down

0 comments on commit 129ad15

Please sign in to comment.