Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType
Commits:
-
0c817334
by Alexei Podtelezhnikov at 2023-08-25T17:57:47+00:00
1 changed file:
Changes:
... | ... | @@ -1070,9 +1070,6 @@ |
1070 | 1070 | {
|
1071 | 1071 | FT_UInt i;
|
1072 | 1072 | FT_Int64 temp;
|
1073 | -#ifndef FT_INT64
|
|
1074 | - FT_Int64 halfUnit;
|
|
1075 | -#endif
|
|
1076 | 1073 | |
1077 | 1074 | |
1078 | 1075 | #ifdef FT_INT64
|
... | ... | @@ -1117,13 +1114,10 @@ |
1117 | 1114 | FT_Add64( &temp, &multResult, &temp );
|
1118 | 1115 | }
|
1119 | 1116 | |
1120 | - /* Round value. */
|
|
1121 | - halfUnit.hi = 0;
|
|
1122 | - halfUnit.lo = 0x8000;
|
|
1123 | - FT_Add64( &temp, &halfUnit, &temp );
|
|
1117 | + /* Shift and round value. */
|
|
1118 | + return (FT_Int32)( ( ( temp.hi << 16 ) | ( temp.lo >> 16 ) )
|
|
1119 | + + ( 1 & ( temp.lo >> 15 ) ) );
|
|
1124 | 1120 | |
1125 | - return (FT_Int32)( ( (FT_Int32)( temp.hi & 0xFFFF ) << 16 ) |
|
|
1126 | - ( temp.lo >> 16 ) );
|
|
1127 | 1121 | |
1128 | 1122 | #endif /* !FT_INT64 */
|
1129 | 1123 |