summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2015-11-18 11:42:03 +0100
committerErich Eckner <git@eckner.net>2015-11-18 11:44:11 +0100
commitc84a57a879a389ee3d1c3d736463eacece7f6dc5 (patch)
tree2cf8aab21a092a7457b3a56d6d0ad6f0230c4ebb
parentfb715c739e9fb69d00e727c864cf59d2a26b811d (diff)
downloadFH-Wetter-c84a57a879a389ee3d1c3d736463eacece7f6dc5.tar.xz
append neu -> kein bisekt -> schneller
-rw-r--r--fhunit.pas27
1 files changed, 21 insertions, 6 deletions
diff --git a/fhunit.pas b/fhunit.pas
index 3c7aec6..8b3f1b0 100644
--- a/fhunit.pas
+++ b/fhunit.pas
@@ -29,8 +29,8 @@ type
public
constructor create;
destructor destroy; override;
- function lade(s: string): boolean;
- function schreibe: string;
+ function lade(s: string): boolean; inline;
+ function schreibe: string; inline;
property zeit: extended
read _uZeit;
property mW[mG: tMessGroesze]: extended
@@ -40,12 +40,13 @@ type
tMessPunkteListe = class
private
inhalt: tFPList;
- function rItem(i: longint): tMessPunkt;
- function bisekt(zeit: extended): longint;
+ function rItem(i: longint): tMessPunkt; inline;
+ function bisekt(zeit: extended): longint; inline;
public
constructor create;
destructor destroy; override;
- function add(s: string): boolean;
+ function add(s: string): boolean; inline;
+ function append(s: string): boolean; inline;
function last: tMessPunkt;
function count: longint;
property items[i: longint]: tMessPunkt
@@ -286,6 +287,20 @@ begin
nm.free;
end;
+function tMessPunkteListe.append(s: string): boolean;
+var
+ nm: tMessPunkt;
+begin
+ result:=false;
+ nm:=tMessPunkt.create;
+ if not nm.lade(s) then begin
+ nm.free;
+ exit;
+ end;
+ result:=true;
+ inhalt.add(nm);
+end;
+
function tMessPunkteListe.last: tMessPunkt;
begin
result:=items[count-1];
@@ -465,7 +480,7 @@ begin
else
f.loadFromFile(von);
while f.readln(s) do
- werte.add(s);
+ werte.append(s);
f.free;
if length(muts)=0 then begin