Recent

Author Topic: Tiny optimization for TDeque  (Read 2021 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2386
    • UVviewsoft
Tiny optimization for TDeque
« on: October 13, 2018, 09:19:56 pm »
Code: Pascal  [Select][+][-]
  1. function TDeque.IsEmpty():boolean;inline;
  2. begin
  3.   if Size()=0 then
  4.     IsEmpty:=true
  5.   else
  6.     IsEmpty:=false;
  7. end;
  8.  

--> Result:= Size=0;

 

TinyPortal © 2005-2018