浏览代码

* remove old ifdefs

git-svn-id: trunk@39642 -
marco 7 年之前
父节点
当前提交
15fcd0ab61
共有 6 个文件被更改,包括 0 次插入71 次删除
  1. 0 40
      rtl/inc/typshrd.inc
  2. 0 8
      rtl/inc/typshrdh.inc
  3. 0 7
      rtl/inc/ustrings.inc
  4. 0 12
      rtl/objpas/fgl.pp
  5. 0 2
      rtl/objpas/sysutils/sysutilh.inc
  6. 0 2
      rtl/objpas/sysutils/sysutils.inc

+ 0 - 40
rtl/inc/typshrd.inc

@@ -200,45 +200,6 @@ begin
     (L.Top = R.Top) and (L.Bottom = R.Bottom);
     (L.Top = R.Top) and (L.Bottom = R.Bottom);
 end;
 end;
 
 
-{$IFDEF VER3_0_0}
-class function TRect.Create(ALeft, ATop, ARight, ABottom: Longint): TRect;
-begin
-  Result.Left := ALeft;
-  Result.Top := ATop;
-  Result.Right := ARight;
-  Result.Bottom := ABottom;
-end;
-
-class function TRect.Create(P1, P2: TPoint; Normalize: Boolean): TRect;
-begin
-  Result.TopLeft := P1;
-  Result.BottomRight := P2;
-  if Normalize then
-    Result.NormalizeRect;
-end;
-
-class function TRect.Create(Origin: TPoint): TRect;
-begin
-  Result.TopLeft := Origin;
-  Result.BottomRight := Origin;
-end;
-
-class function TRect.Create(Origin: TPoint; AWidth, AHeight: Longint): TRect;
-begin
-  Result.TopLeft := Origin;
-  Result.Width := AWidth;
-  Result.Height := AHeight;
-end;
-
-class function TRect.Create(R: TRect; Normalize: Boolean): TRect;
-begin
-  Result := R;
-  if Normalize then
-    Result.NormalizeRect;
-end;
-
-{$ELSE}
-
 constructor TRect.Create(ALeft, ATop, ARight, ABottom: Longint);
 constructor TRect.Create(ALeft, ATop, ARight, ABottom: Longint);
 begin
 begin
   Left := ALeft;
   Left := ALeft;
@@ -274,7 +235,6 @@ begin
   if Normalize then
   if Normalize then
     NormalizeRect;
     NormalizeRect;
 end;
 end;
-{$ENDIF}
 
 
 function TRect.CenterPoint: TPoint;
 function TRect.CenterPoint: TPoint;
 begin
 begin

+ 0 - 8
rtl/inc/typshrdh.inc

@@ -112,19 +112,11 @@
        procedure setSize(AValue: TSize);
        procedure setSize(AValue: TSize);
        procedure setWidth (AValue: Longint);
        procedure setWidth (AValue: Longint);
      public
      public
-{$IFDEF VER3_0_0}
-       class function Create(Origin: TPoint): TRect; static; // empty rect at given origin
-       class function Create(Origin: TPoint; AWidth, AHeight: Longint): TRect; static;
-       class function Create(ALeft, ATop, ARight, ABottom: Longint): TRect; static;   
-       class function Create(P1, P2: TPoint; Normalize: Boolean = False): TRect; static;
-       class function Create(R: TRect; Normalize: Boolean = False): TRect; static;
-{$ELSE}       
        constructor Create(Origin: TPoint); // empty rect at given origin
        constructor Create(Origin: TPoint); // empty rect at given origin
        constructor Create(Origin: TPoint; AWidth, AHeight: Longint);
        constructor Create(Origin: TPoint; AWidth, AHeight: Longint);
        constructor Create(ALeft, ATop, ARight, ABottom: Longint);
        constructor Create(ALeft, ATop, ARight, ABottom: Longint);
        constructor Create(P1, P2: TPoint; Normalize: Boolean = False);
        constructor Create(P1, P2: TPoint; Normalize: Boolean = False);
        constructor Create(R: TRect; Normalize: Boolean = False);
        constructor Create(R: TRect; Normalize: Boolean = False);
-{$ENDIF}       
        class operator = (L, R: TRect): Boolean;
        class operator = (L, R: TRect): Boolean;
        class operator <> (L, R: TRect): Boolean;
        class operator <> (L, R: TRect): Boolean;
        class operator + (L, R: TRect): TRect; // union
        class operator + (L, R: TRect): TRect; // union

+ 0 - 7
rtl/inc/ustrings.inc

@@ -599,11 +599,7 @@ end;
 
 
 {$ifndef FPC_HAS_UCHAR_TO_SHORTSTR}
 {$ifndef FPC_HAS_UCHAR_TO_SHORTSTR}
 {$define FPC_HAS_UCHAR_TO_SHORTSTR}
 {$define FPC_HAS_UCHAR_TO_SHORTSTR}
-{$ifdef VER2_6}
-procedure fpc_UChar_To_ShortStr(out result : shortstring;const c : WideChar); compilerproc;
-{$else}
 function fpc_UChar_To_ShortStr(const c : WideChar): shortstring; compilerproc;
 function fpc_UChar_To_ShortStr(const c : WideChar): shortstring; compilerproc;
-{$endif}
 {
 {
   Converts a WideChar to a ShortString;
   Converts a WideChar to a ShortString;
 }
 }
@@ -959,9 +955,6 @@ Var
   nl,lens, lena : SizeUInt;
   nl,lens, lena : SizeUInt;
 begin
 begin
   nl:=l;
   nl:=l;
-{$IFDEF VER2_6}
-  nl:=nl*2;
-{$ENDIF}
    if (l>0) then
    if (l>0) then
     begin
     begin
       if Pointer(S)=nil then
       if Pointer(S)=nil then

+ 0 - 12
rtl/objpas/fgl.pp

@@ -1619,11 +1619,7 @@ begin
   if Result then
   if Result then
     AData := TData(inherited GetData(I)^)
     AData := TData(inherited GetData(I)^)
   else
   else
-{$IFDEF VER2_6}  
-    FillChar(AData,SizeOf(TData),0);
-{$ELSE}
     AData := Default(TData);
     AData := Default(TData);
-{$ENDIF}    
 end;
 end;
 
 
 procedure TFPGMap.AddOrSetData(const AKey: TKey; const AData: TData);
 procedure TFPGMap.AddOrSetData(const AKey: TKey; const AData: TData);
@@ -1805,11 +1801,7 @@ begin
   if Result then
   if Result then
     AData := TData(inherited GetData(I)^)
     AData := TData(inherited GetData(I)^)
   else
   else
-{$IFDEF VER2_6}
-    FillChar(AData,SizeOf(TData),0);
-{$ELSE}
     AData := Default(TData);
     AData := Default(TData);
-{$ENDIF}
 end;
 end;
 
 
 procedure TFPGMapObject.AddOrSetData(const AKey: TKey; const AData: TData);
 procedure TFPGMapObject.AddOrSetData(const AKey: TKey; const AData: TData);
@@ -1987,11 +1979,7 @@ begin
   if Result then
   if Result then
     AData := TData(inherited GetData(I)^)
     AData := TData(inherited GetData(I)^)
   else
   else
-{$IFDEF VER2_6}
-    FillChar(AData,SizeOf(TData),0);
-{$ELSE}
     AData := Default(TData);
     AData := Default(TData);
-{$ENDIF}
 end;
 end;
 
 
 procedure TFPGMapInterfacedObjectData.AddOrSetData(const AKey: TKey;
 procedure TFPGMapInterfacedObjectData.AddOrSetData(const AKey: TKey;

+ 0 - 2
rtl/objpas/sysutils/sysutilh.inc

@@ -326,9 +326,7 @@ Type
   {$i systhrdh.inc}
   {$i systhrdh.inc}
 
 
   { Type Helpers}
   { Type Helpers}
-  {$IFNDEF VER2_6}
   {$i syshelph.inc}
   {$i syshelph.inc}
-  {$ENDIF}
   
   
   procedure FreeAndNil(var obj);
   procedure FreeAndNil(var obj);
   procedure FreeMemAndNil(var p);
   procedure FreeMemAndNil(var p);

+ 0 - 2
rtl/objpas/sysutils/sysutils.inc

@@ -41,9 +41,7 @@
   {$i varerror.inc}
   {$i varerror.inc}
   
   
   { Type helpers}
   { Type helpers}
-  {$IFNDEF VER2_6}
   {$i syshelp.inc}
   {$i syshelp.inc}
-  {$ENDIF}
 
 
   {$ifndef OS_FILEISREADONLY}
   {$ifndef OS_FILEISREADONLY}
   Function FileIsReadOnly(const FileName: RawByteString): Boolean;
   Function FileIsReadOnly(const FileName: RawByteString): Boolean;