Browse Source

* better handling of floating point types

git-svn-id: trunk@36908 -
svenbarth 8 years ago
parent
commit
89e47e098a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      packages/rtl-objpas/src/inc/rtti.pp

+ 4 - 0
packages/rtl-objpas/src/inc/rtti.pp

@@ -508,7 +508,10 @@ begin
     tkFloat    : begin
     tkFloat    : begin
                    case GetTypeData(ATypeInfo)^.FloatType of
                    case GetTypeData(ATypeInfo)^.FloatType of
                      ftCurr   : result.FData.FAsCurr := PCurrency(ABuffer)^;
                      ftCurr   : result.FData.FAsCurr := PCurrency(ABuffer)^;
+                     ftSingle : result.FData.FAsSingle := PSingle(ABuffer)^;
                      ftDouble : result.FData.FAsDouble := PDouble(ABuffer)^;
                      ftDouble : result.FData.FAsDouble := PDouble(ABuffer)^;
+                     ftExtended: result.FData.FAsExtended := PExtended(ABuffer)^;
+                     ftComp   : result.FData.FAsComp := PComp(ABuffer)^;
                    end;
                    end;
                  end;
                  end;
   else
   else
@@ -563,6 +566,7 @@ begin
   if Kind = tkFloat then
   if Kind = tkFloat then
     begin
     begin
     case TypeData^.FloatType of
     case TypeData^.FloatType of
+      ftSingle   : result := FData.FAsSingle;
       ftDouble   : result := FData.FAsDouble;
       ftDouble   : result := FData.FAsDouble;
       ftExtended : result := FData.FAsExtended;
       ftExtended : result := FData.FAsExtended;
     else
     else