mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 06:06:17 +02:00
* changed min and max so more efficient code is generated for them
git-svn-id: trunk@2209 -
This commit is contained in:
parent
c54826b403
commit
a8ea851999
@ -149,10 +149,10 @@ uses
|
|||||||
return the minimal of a and b
|
return the minimal of a and b
|
||||||
}
|
}
|
||||||
begin
|
begin
|
||||||
if a>b then
|
if a<=b then
|
||||||
min:=b
|
min:=a
|
||||||
else
|
else
|
||||||
min:=a;
|
min:=b;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -161,10 +161,10 @@ uses
|
|||||||
return the minimal of a and b
|
return the minimal of a and b
|
||||||
}
|
}
|
||||||
begin
|
begin
|
||||||
if a>b then
|
if a<=b then
|
||||||
min:=b
|
min:=a
|
||||||
else
|
else
|
||||||
min:=a;
|
min:=b;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -173,10 +173,10 @@ uses
|
|||||||
return the maximum of a and b
|
return the maximum of a and b
|
||||||
}
|
}
|
||||||
begin
|
begin
|
||||||
if a<b then
|
if a>=b then
|
||||||
max:=b
|
max:=a
|
||||||
else
|
else
|
||||||
max:=a;
|
max:=b;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -185,10 +185,10 @@ uses
|
|||||||
return the maximum of a and b
|
return the maximum of a and b
|
||||||
}
|
}
|
||||||
begin
|
begin
|
||||||
if a<b then
|
if a>=b then
|
||||||
max:=b
|
max:=a
|
||||||
else
|
else
|
||||||
max:=a;
|
max:=b;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user