mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-22 06:09:14 +02:00
* Change two precondition checks into assertions.
git-svn-id: trunk@3836 -
This commit is contained in:
parent
cfcc14fdb9
commit
31c77b43d8
@ -1485,7 +1485,9 @@ end;
|
|||||||
|
|
||||||
destructor TEditorLineInfo.Done;
|
destructor TEditorLineInfo.Done;
|
||||||
begin
|
begin
|
||||||
if Format<>nil then DisposeStr(Format); Format:=nil;
|
if Format<>nil then
|
||||||
|
DisposeStr(Format);
|
||||||
|
Format:=nil;
|
||||||
SetFold(nil);
|
SetFold(nil);
|
||||||
inherited Done;
|
inherited Done;
|
||||||
end;
|
end;
|
||||||
@ -1522,8 +1524,7 @@ var B: PEditorBinding;
|
|||||||
Count,I,Idx: sw_integer;
|
Count,I,Idx: sw_integer;
|
||||||
L: PCustomLine;
|
L: PCustomLine;
|
||||||
begin
|
begin
|
||||||
if Assigned(AEditor)=false then Exit;
|
assert(Aeditor<>nil);
|
||||||
|
|
||||||
New(B, Init(AEditor));
|
New(B, Init(AEditor));
|
||||||
Bindings^.Insert(B);
|
Bindings^.Insert(B);
|
||||||
Idx:=Bindings^.IndexOf(B);
|
Idx:=Bindings^.IndexOf(B);
|
||||||
@ -1543,6 +1544,7 @@ var B: PEditorBinding;
|
|||||||
Count,I: sw_integer;
|
Count,I: sw_integer;
|
||||||
L: PCustomLine;
|
L: PCustomLine;
|
||||||
begin
|
begin
|
||||||
|
assert(Aeditor<>nil);
|
||||||
B:=SearchBinding(AEditor);
|
B:=SearchBinding(AEditor);
|
||||||
if Assigned(B) then
|
if Assigned(B) then
|
||||||
begin
|
begin
|
||||||
@ -3044,7 +3046,7 @@ begin
|
|||||||
Inc(LineDelta);
|
Inc(LineDelta);
|
||||||
OK:=GetLineCount<MaxLineCount;
|
OK:=GetLineCount<MaxLineCount;
|
||||||
end;
|
end;
|
||||||
if OK=false then EditorDialog(edTooManyLines,nil);
|
if not OK then EditorDialog(edTooManyLines,nil);
|
||||||
{ mainly to force eaMove insertion }
|
{ mainly to force eaMove insertion }
|
||||||
if not IsClipboard then
|
if not IsClipboard then
|
||||||
SetCurPtr(EPos.X,EPos.Y);
|
SetCurPtr(EPos.X,EPos.Y);
|
||||||
|
Loading…
Reference in New Issue
Block a user