From 15fcd0ab61befcd0a967278113e9e3722cf660f4 Mon Sep 17 00:00:00 2001 From: marco Date: Sun, 19 Aug 2018 14:54:58 +0000 Subject: [PATCH] * remove old ifdefs git-svn-id: trunk@39642 - --- rtl/inc/typshrd.inc | 40 -------------------------------- rtl/inc/typshrdh.inc | 8 ------- rtl/inc/ustrings.inc | 7 ------ rtl/objpas/fgl.pp | 12 ---------- rtl/objpas/sysutils/sysutilh.inc | 2 -- rtl/objpas/sysutils/sysutils.inc | 2 -- 6 files changed, 71 deletions(-) diff --git a/rtl/inc/typshrd.inc b/rtl/inc/typshrd.inc index 8b4bdaf20a..68f3034359 100644 --- a/rtl/inc/typshrd.inc +++ b/rtl/inc/typshrd.inc @@ -200,45 +200,6 @@ begin (L.Top = R.Top) and (L.Bottom = R.Bottom); 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); begin Left := ALeft; @@ -274,7 +235,6 @@ begin if Normalize then NormalizeRect; end; -{$ENDIF} function TRect.CenterPoint: TPoint; begin diff --git a/rtl/inc/typshrdh.inc b/rtl/inc/typshrdh.inc index e62be937ae..ee6d4b1ea8 100644 --- a/rtl/inc/typshrdh.inc +++ b/rtl/inc/typshrdh.inc @@ -112,19 +112,11 @@ procedure setSize(AValue: TSize); procedure setWidth (AValue: Longint); 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; AWidth, AHeight: Longint); constructor Create(ALeft, ATop, ARight, ABottom: Longint); constructor Create(P1, P2: TPoint; 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): TRect; // union diff --git a/rtl/inc/ustrings.inc b/rtl/inc/ustrings.inc index 96affa6b05..b38a7a458e 100644 --- a/rtl/inc/ustrings.inc +++ b/rtl/inc/ustrings.inc @@ -599,11 +599,7 @@ end; {$ifndef 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; -{$endif} { Converts a WideChar to a ShortString; } @@ -959,9 +955,6 @@ Var nl,lens, lena : SizeUInt; begin nl:=l; -{$IFDEF VER2_6} - nl:=nl*2; -{$ENDIF} if (l>0) then begin if Pointer(S)=nil then diff --git a/rtl/objpas/fgl.pp b/rtl/objpas/fgl.pp index c05224b1b0..4e5f7cf1d0 100644 --- a/rtl/objpas/fgl.pp +++ b/rtl/objpas/fgl.pp @@ -1619,11 +1619,7 @@ begin if Result then AData := TData(inherited GetData(I)^) else -{$IFDEF VER2_6} - FillChar(AData,SizeOf(TData),0); -{$ELSE} AData := Default(TData); -{$ENDIF} end; procedure TFPGMap.AddOrSetData(const AKey: TKey; const AData: TData); @@ -1805,11 +1801,7 @@ begin if Result then AData := TData(inherited GetData(I)^) else -{$IFDEF VER2_6} - FillChar(AData,SizeOf(TData),0); -{$ELSE} AData := Default(TData); -{$ENDIF} end; procedure TFPGMapObject.AddOrSetData(const AKey: TKey; const AData: TData); @@ -1987,11 +1979,7 @@ begin if Result then AData := TData(inherited GetData(I)^) else -{$IFDEF VER2_6} - FillChar(AData,SizeOf(TData),0); -{$ELSE} AData := Default(TData); -{$ENDIF} end; procedure TFPGMapInterfacedObjectData.AddOrSetData(const AKey: TKey; diff --git a/rtl/objpas/sysutils/sysutilh.inc b/rtl/objpas/sysutils/sysutilh.inc index 9a14c25fed..c8614493ce 100644 --- a/rtl/objpas/sysutils/sysutilh.inc +++ b/rtl/objpas/sysutils/sysutilh.inc @@ -326,9 +326,7 @@ Type {$i systhrdh.inc} { Type Helpers} - {$IFNDEF VER2_6} {$i syshelph.inc} - {$ENDIF} procedure FreeAndNil(var obj); procedure FreeMemAndNil(var p); diff --git a/rtl/objpas/sysutils/sysutils.inc b/rtl/objpas/sysutils/sysutils.inc index 5a2e1d816f..aa5b8f0a06 100644 --- a/rtl/objpas/sysutils/sysutils.inc +++ b/rtl/objpas/sysutils/sysutils.inc @@ -41,9 +41,7 @@ {$i varerror.inc} { Type helpers} - {$IFNDEF VER2_6} {$i syshelp.inc} - {$ENDIF} {$ifndef OS_FILEISREADONLY} Function FileIsReadOnly(const FileName: RawByteString): Boolean;