Skip to content

Commit

Permalink
Remove nullcheck for known non-null value
Browse files Browse the repository at this point in the history
  • Loading branch information
vpop committed Aug 23, 2016
1 parent 8134d7f commit e5d03ba
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 e5d03ba

Please sign in to comment.