Răsfoiți Sursa

* fixed some compiler warnings

armin 21 ani în urmă
părinte
comite
dc7edb39d0
1 a modificat fișierele cu 18 adăugiri și 15 ștergeri
  1. 18 15
      rtl/objpas/dateutil.inc

+ 18 - 15
rtl/objpas/dateutil.inc

@@ -1513,18 +1513,18 @@ end;
 
 
 Function EncodeDateWeek(const AYear, AWeekOfYear: Word): TDateTime; //; const ADayOfWeek: Word = 1
 Function EncodeDateWeek(const AYear, AWeekOfYear: Word): TDateTime; //; const ADayOfWeek: Word = 1
 begin
 begin
-  EncodeDateWeek(AYear,AWeekOfYear,1);
+  Result := EncodeDateWeek(AYear,AWeekOfYear,1);
 end;
 end;
 
 
 
 
 Procedure DecodeDateWeek(const AValue: TDateTime; var AYear, AWeekOfYear, ADayOfWeek: Word);
 Procedure DecodeDateWeek(const AValue: TDateTime; var AYear, AWeekOfYear, ADayOfWeek: Word);
-  
+
 var
 var
   DOY : Integer;
   DOY : Integer;
   D: Word;
   D: Word;
   YS : TDateTime;
   YS : TDateTime;
   YSDOW, YEDOW: Word;
   YSDOW, YEDOW: Word;
-  
+
 begin
 begin
   AYear:=YearOf(AValue);
   AYear:=YearOf(AValue);
   // Correct to ISO DOW
   // Correct to ISO DOW
@@ -1535,7 +1535,7 @@ begin
   DOY:=Trunc(AValue-YS)+1;
   DOY:=Trunc(AValue-YS)+1;
   YSDOW:=DayOfTheWeek(YS);
   YSDOW:=DayOfTheWeek(YS);
   // Correct week if later than wednesday. First week never starts later than wednesday
   // Correct week if later than wednesday. First week never starts later than wednesday
-  if (YSDOW<5) then 
+  if (YSDOW<5) then
     Inc(DOY,YSDOW-1)
     Inc(DOY,YSDOW-1)
   else
   else
     Dec(DOY,8-YSDOW);
     Dec(DOY,8-YSDOW);
@@ -1692,55 +1692,55 @@ Const
 Function RecodeYear(const AValue: TDateTime; const AYear: Word): TDateTime;
 Function RecodeYear(const AValue: TDateTime; const AYear: Word): TDateTime;
 
 
 begin
 begin
-  RecodeDateTime(AValue,AYear,LFAI,LFAI,LFAI,LFAI,LFAI,LFAI);
+  Result := RecodeDateTime(AValue,AYear,LFAI,LFAI,LFAI,LFAI,LFAI,LFAI);
 end;
 end;
 
 
 
 
 Function RecodeMonth(const AValue: TDateTime; const AMonth: Word): TDateTime;
 Function RecodeMonth(const AValue: TDateTime; const AMonth: Word): TDateTime;
 begin
 begin
-  RecodeDateTime(AValue,LFAI,AMonth,LFAI,LFAI,LFAI,LFAI,LFAI);
+  Result := RecodeDateTime(AValue,LFAI,AMonth,LFAI,LFAI,LFAI,LFAI,LFAI);
 end;
 end;
 
 
 
 
 Function RecodeDay(const AValue: TDateTime; const ADay: Word): TDateTime;
 Function RecodeDay(const AValue: TDateTime; const ADay: Word): TDateTime;
 begin
 begin
-  RecodeDateTime(AValue,LFAI,LFAI,ADay,LFAI,LFAI,LFAI,LFAI);
+  Result := RecodeDateTime(AValue,LFAI,LFAI,ADay,LFAI,LFAI,LFAI,LFAI);
 end;
 end;
 
 
 
 
 Function RecodeHour(const AValue: TDateTime; const AHour: Word): TDateTime;
 Function RecodeHour(const AValue: TDateTime; const AHour: Word): TDateTime;
 begin
 begin
-  RecodeDateTime(AValue,LFAI,LFAI,LFAI,AHour,LFAI,LFAI,LFAI);
+  Result := RecodeDateTime(AValue,LFAI,LFAI,LFAI,AHour,LFAI,LFAI,LFAI);
 end;
 end;
 
 
 
 
 Function RecodeMinute(const AValue: TDateTime; const AMinute: Word): TDateTime;
 Function RecodeMinute(const AValue: TDateTime; const AMinute: Word): TDateTime;
 begin
 begin
-  RecodeDateTime(AValue,LFAI,LFAI,LFAI,LFAI,AMinute,LFAI,LFAI);
+  Result := RecodeDateTime(AValue,LFAI,LFAI,LFAI,LFAI,AMinute,LFAI,LFAI);
 end;
 end;
 
 
 
 
 Function RecodeSecond(const AValue: TDateTime; const ASecond: Word): TDateTime;
 Function RecodeSecond(const AValue: TDateTime; const ASecond: Word): TDateTime;
 begin
 begin
-  RecodeDateTime(AValue,LFAI,LFAI,LFAI,LFAI,LFAI,ASecond,LFAI);
+  Result := RecodeDateTime(AValue,LFAI,LFAI,LFAI,LFAI,LFAI,ASecond,LFAI);
 end;
 end;
 
 
 
 
 Function RecodeMilliSecond(const AValue: TDateTime; const AMilliSecond: Word): TDateTime;
 Function RecodeMilliSecond(const AValue: TDateTime; const AMilliSecond: Word): TDateTime;
 begin
 begin
-  RecodeDateTime(AValue,LFAI,LFAI,LFAI,LFAI,LFAI,LFAI,AMilliSecond);
+  Result := RecodeDateTime(AValue,LFAI,LFAI,LFAI,LFAI,LFAI,LFAI,AMilliSecond);
 end;
 end;
 
 
 
 
 Function RecodeDate(const AValue: TDateTime; const AYear, AMonth, ADay: Word): TDateTime;
 Function RecodeDate(const AValue: TDateTime; const AYear, AMonth, ADay: Word): TDateTime;
 begin
 begin
-  RecodeDateTime(AValue,AYear,AMonth,ADay,LFAI,LFAI,LFAI,LFAI);
+  Result := RecodeDateTime(AValue,AYear,AMonth,ADay,LFAI,LFAI,LFAI,LFAI);
 end;
 end;
 
 
 
 
 Function RecodeTime(const AValue: TDateTime; const AHour, AMinute, ASecond, AMilliSecond: Word): TDateTime;
 Function RecodeTime(const AValue: TDateTime; const AHour, AMinute, ASecond, AMilliSecond: Word): TDateTime;
 begin
 begin
-  RecodeDateTime(AValue,LFAI,LFAI,LFAI,AHour,AMinute,ASecond,AMilliSecond);
+  Result := RecodeDateTime(AValue,LFAI,LFAI,LFAI,AHour,AMinute,ASecond,AMilliSecond);
 end;
 end;
 
 
 
 
@@ -1996,7 +1996,10 @@ end.
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.3  2004-08-12 12:26:34  michael
+  Revision 1.4  2004-09-19 19:25:52  armin
+  * fixed some compiler warnings
+
+  Revision 1.3  2004/08/12 12:26:34  michael
   + Implemented decodedateweek
   + Implemented decodedateweek
 
 
   Revision 1.2  2004/01/10 19:35:17  michael
   Revision 1.2  2004/01/10 19:35:17  michael
@@ -2008,4 +2011,4 @@ end.
   Revision 1.2  2003/01/19 14:37:06  michael
   Revision 1.2  2003/01/19 14:37:06  michael
   + Much more functions implemented
   + Much more functions implemented
 
 
-}
+}