mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 06:11:35 +02:00
* inline the ** operators since they just call functions directly
git-svn-id: trunk@11461 -
This commit is contained in:
parent
a9d85dea89
commit
3588a9d02c
@ -314,8 +314,8 @@ function power(base,exponent : float) : float;
|
|||||||
{ base^exponent }
|
{ base^exponent }
|
||||||
function intpower(base : float;const exponent : Integer) : float;
|
function intpower(base : float;const exponent : Integer) : float;
|
||||||
|
|
||||||
operator ** (bas,expo : float) e: float;
|
operator ** (bas,expo : float) e: float; inline;
|
||||||
operator ** (bas,expo : int64) i: int64;
|
operator ** (bas,expo : int64) i: int64; inline;
|
||||||
|
|
||||||
{ number converting }
|
{ number converting }
|
||||||
|
|
||||||
@ -909,13 +909,13 @@ function intpower(base : float;const exponent : Integer) : float;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
operator ** (bas,expo : float) e: float;
|
operator ** (bas,expo : float) e: float; inline;
|
||||||
begin
|
begin
|
||||||
e:=power(bas,expo);
|
e:=power(bas,expo);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
operator ** (bas,expo : int64) i: int64;
|
operator ** (bas,expo : int64) i: int64; inline;
|
||||||
begin
|
begin
|
||||||
i:=round(intpower(bas,expo));
|
i:=round(intpower(bas,expo));
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user