Revision: 6985
http://skim-app.svn.sourceforge.net/skim-app/?rev=6985&view=rev
Author: hofman
Date: 2010-12-17 12:55:25 +0000 (Fri, 17 Dec 2010)
Log Message:
-----------
avoid a nested if loop
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2010-12-17 12:50:44 UTC (rev 6984)
+++ trunk/SKPDFView.m 2010-12-17 12:55:25 UTC (rev 6985)
@@ -3450,14 +3450,12 @@
else if (dragMask & SKMinYEdgeMask)
height -= delta.y;
- if (dragMask & (SKMinXEdgeMask | SKMaxXEdgeMask)) {
- if (dragMask & (SKMinYEdgeMask | SKMaxYEdgeMask))
- square = fmax(fabs(width), fabs(height));
- else
- square = fabs(width);
- } else {
+ if (0 == (dragMask & (SKMinXEdgeMask | SKMaxXEdgeMask)))
square = fabs(height);
- }
+ else if (0 == (dragMask & (SKMinYEdgeMask | SKMaxYEdgeMask)))
+ square = fabs(width);
+ else
+ square = fmax(fabs(width), fabs(height));
if (dragMask & SKMinXEdgeMask) {
if (width >= 0.0 && NSMaxX(newRect) - square <
NSMinX(pageBounds))
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit