Эх сурвалжийг харах

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 жил өмнө
parent
commit
851d065ace

+ 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);