ZGE Source Code discussion. Ask questions, present your changes, propose patches etc.
Moderator: Moderators
-
simsmen
- Posts: 4
- Joined: Tue Feb 10, 2009 4:31 am
- Location: Russia
-
Contact:
Post
by simsmen »
Code: Select all
{$ifndef minimal}CheckValidIndex(Index);{$endif}
May be?
Code: Select all
{$ifndef minimal}ZAssert((Index >= 0) and (Index < FCount), 'ZArrayList bad index');{$endif}
{$ifndef minimal}
procedure ZAssert(const Condition: Boolean; const aText: string);
begin
if Condition then
Exit;
WriteLog(aText);
ZHalt(aText);
end;
{$endif}
This code may use in more place
-
VilleK
- Site Admin
- Posts: 2320
- Joined: Mon Jan 15, 2007 4:50 pm
- Location: Stockholm, Sweden
-
Contact:
Post
by VilleK »
Good point. There is already a ZAssert in ZLog-unit so maybe I should use that instead.
Welcome to these forums simsmen!
-
simsmen
- Posts: 4
- Joined: Tue Feb 10, 2009 4:31 am
- Location: Russia
-
Contact:
Post
by simsmen »
Thanks:)
I do't see ZAssert earlier. My edition of ZAssert faster, if Condition is True