소스 검색

* readd SmallInt typecasts to SmallInt overload of SwapEndian

git-svn-id: trunk@46898 -
svenbarth 4 년 전
부모
커밋
0c316deab5
3개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      rtl/arm/arm.inc
  2. 1 1
      rtl/inc/generic.inc
  3. 1 1
      rtl/x86_64/x86_64.inc

+ 1 - 1
rtl/arm/arm.inc

@@ -1190,7 +1190,7 @@ function SwapEndian(const AValue: SmallInt): SmallInt;{$ifdef SYSTEMINLINE}inlin
     { is turned into "longint(AValue) shr 8", so if AValue < 0 then    }
     { the sign bits from the upper 16 bits are shifted in rather than  }
     { zeroes.                                                          }
-    Result := ((Word(AValue) shr 8) or (Word(AValue) shl 8)) and $ffff;
+    Result := SmallInt(((Word(AValue) shr 8) or (Word(AValue) shl 8)) and $ffff);
   end;
 
 

+ 1 - 1
rtl/inc/generic.inc

@@ -2663,7 +2663,7 @@ function SwapEndian(const AValue: SmallInt): SmallInt;{$ifdef SYSTEMINLINE}inlin
     { is turned into "longint(AValue) shr 8", so if AValue < 0 then    }
     { the sign bits from the upper 16 bits are shifted in rather than  }
     { zeroes.                                                          }
-    Result := ((Word(AValue) shr 8) or (Word(AValue) shl 8)) and $ffff;
+    Result := SmallInt(((Word(AValue) shr 8) or (Word(AValue) shl 8)) and $ffff);
   end;
 
 {$ifndef cpujvm}

+ 1 - 1
rtl/x86_64/x86_64.inc

@@ -1021,7 +1021,7 @@ function SwapEndian(const AValue: SmallInt): SmallInt;{$ifdef SYSTEMINLINE}inlin
     { is turned into "longint(AValue) shr 8", so if AValue < 0 then    }
     { the sign bits from the upper 16 bits are shifted in rather than  }
     { zeroes.                                                          }
-    Result := ((Word(AValue) shr 8) or (Word(AValue) shl 8)) and $ffff;
+    Result := SmallInt(((Word(AValue) shr 8) or (Word(AValue) shl 8)) and $ffff);
   end;