Преглед изворни кода

ortiz.touch: End switch case with an unconditional break.

When the execution is not explicitly terminated at the end of a switch case, it continues to execute the statements of the following case. While this is sometimes intentional, it often is a mistake which leads to unexpected behavior
ardevd пре 7 година
родитељ
комит
851d065ace
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      src/main/java/com/ortiz/touch/TouchImageView.java

+ 1 - 0
src/main/java/com/ortiz/touch/TouchImageView.java

@@ -572,6 +572,7 @@ public class TouchImageView extends AppCompatImageView {
         	
         case CENTER_INSIDE:
         	scaleX = scaleY = Math.min(1, Math.min(scaleX, scaleY));
+        	break;
         	
         case FIT_CENTER:
         	scaleX = scaleY = Math.min(scaleX, scaleY);