summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2012-08-16 15:10:55 +0200
committerTor Andersson <tor.andersson@artifex.com>2012-08-16 15:10:55 +0200
commit6e7b3abc34267f351810bb7b01dafa9586cdd9c8 (patch)
tree8e9027c1226b1b5fed7f1e93a6840e8ddc94352c /ios
parent48d7b86a6f305eced526ebb7a85822f85139752f (diff)
downloadmupdf-6e7b3abc34267f351810bb7b01dafa9586cdd9c8.tar.xz
ios: Use fz_max and fz_min inline functions instead of MAX/MIN macros.
Diffstat (limited to 'ios')
-rw-r--r--ios/main.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/ios/main.m b/ios/main.m
index 70cd3712..0f80505d 100644
--- a/ios/main.m
+++ b/ios/main.m
@@ -189,7 +189,7 @@ static CGSize fitPageToScreen(CGSize page, CGSize screen)
{
float hscale = screen.width / page.width;
float vscale = screen.height / page.height;
- float scale = MIN(hscale, vscale);
+ float scale = fz_min(hscale, vscale);
hscale = floorf(page.width * scale) / page.width;
vscale = floorf(page.height * scale) / page.height;
return CGSizeMake(hscale, vscale);
@@ -1065,7 +1065,7 @@ static UIImage *renderTile(struct document *doc, int number, CGSize screenSize,
- (void) viewWillLayoutSubviews
{
CGSize size = [canvas frame].size;
- int max_width = MAX(width, size.width);
+ int max_width = fz_max(width, size.width);
width = size.width;
height = size.height;