From 5a9c710034e82419c1f5f688eacc30c5b51fc070 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 3 Feb 2005 09:47:38 +0000 Subject: [PATCH] 2005-02-03 10:54 Alexander Malmberg * Source/NSImage.m (min, max): Rename to ... (gs_min, gs_max): ... this. Update callers. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20650 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSImage.m | 28 ++++++++++++++-------------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9749000bc..1a48ac7b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-02-03 10:54 Alexander Malmberg + + * Source/NSImage.m (min, max): Rename to ... + (gs_min, gs_max): ... this. Update callers. + 2005-01-28 21:58 Gregory John Casamento * Source/NSColorWell.m: [NSColorWell mouseDown:] prevent use diff --git a/Source/NSImage.m b/Source/NSImage.m index 98c0c911e..1c8b56f4a 100644 --- a/Source/NSImage.m +++ b/Source/NSImage.m @@ -54,14 +54,14 @@ /* Helpers. Would be nicer to use the C99 fmin/fmax functions, but that isn't currently possible. */ -static double min(double x, double y) +static double gs_min(double x, double y) { if (x > y) return y; else return x; } -static double max(double x, double y) +static double gs_max(double x, double y) { if (x < y) return y; @@ -985,22 +985,22 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep) y0 = y1 = p.y; p = [transform transformPoint: NSMakePoint(s.width, 0)]; - x0 = min(x0, p.x); - y0 = min(y0, p.y); - x1 = max(x1, p.x); - y1 = max(y1, p.y); + x0 = gs_min(x0, p.x); + y0 = gs_min(y0, p.y); + x1 = gs_max(x1, p.x); + y1 = gs_max(y1, p.y); p = [transform transformPoint: NSMakePoint(s.width, s.height)]; - x0 = min(x0, p.x); - y0 = min(y0, p.y); - x1 = max(x1, p.x); - y1 = max(y1, p.y); + x0 = gs_min(x0, p.x); + y0 = gs_min(y0, p.y); + x1 = gs_max(x1, p.x); + y1 = gs_max(y1, p.y); p = [transform transformPoint: NSMakePoint(0, 0)]; - x0 = min(x0, p.x); - y0 = min(y0, p.y); - x1 = max(x1, p.x); - y1 = max(y1, p.y); + x0 = gs_min(x0, p.x); + y0 = gs_min(y0, p.y); + x1 = gs_max(x1, p.x); + y1 = gs_max(y1, p.y); x0 = floor(x0); y0 = floor(y0);