Skip to content

Commit 1858b3e

Browse files
author
Chris Williams
committed
Rename srcWord to src
1 parent 08d111d commit 1858b3e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

stdlib/public/core/FixedPoint.swift.gyb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -433,24 +433,24 @@ import gyb
433433
fixed_fixed_conversion_function = gyb.parse_template("fixed_fixed_conversion_function",
434434
"""
435435
%
436-
let srcNotWord = value._value
436+
let src = value._value
437437
let result: (value: Builtin.${BuiltinName}, error: Builtin.Int1)
438438
%
439439
% if srcBits == bits and srcSign == sign: # Exact same size/signedness.
440-
result = (srcNotWord, false._value)
440+
result = (src, false._value)
441441
%
442442
% elif srcBits == bits: # Same size, switching signs.
443-
result = Builtin.${srcSign}_to_${sign}_checked_conversion_Int${srcBits}(srcNotWord)
443+
result = Builtin.${srcSign}_to_${sign}_checked_conversion_Int${srcBits}(src)
444444
%
445445
% elif srcBits > bits: # Larger input, check for truncation.
446-
result = Builtin.${srcSign}_to_${sign}_checked_trunc_Int${srcBits}_Int${bits}(srcNotWord)
446+
result = Builtin.${srcSign}_to_${sign}_checked_trunc_Int${srcBits}_Int${bits}(src)
447447
%
448448
% elif srcSigned and not signed: # Smaller size input, signed going to unsigned.
449-
let (tmp, signError) = Builtin.s_to_u_checked_conversion_Int${srcBits}(srcNotWord)
449+
let (tmp, signError) = Builtin.s_to_u_checked_conversion_Int${srcBits}(src)
450450
result = (Builtin.${srcExt}_Int${srcBits}_Int${bits}(tmp), signError)
451451
%
452452
% else: # Smaller size input, unsigned to signed or unsigned to unsigned.
453-
result = (Builtin.${srcExt}_Int${srcBits}_Int${bits}(srcNotWord), false._value)
453+
result = (Builtin.${srcExt}_Int${srcBits}_Int${bits}(src), false._value)
454454
% end
455455
%
456456
% if not safelyConvertable:
@@ -501,12 +501,12 @@ extension ${Self} {
501501
@_transparent
502502
public init(truncatingBitPattern: ${Src}) {
503503
%
504-
let srcNotWord = truncatingBitPattern._value
504+
let src = truncatingBitPattern._value
505505
%
506506
% if self_ty.bits == src_ty.bits:
507-
let dstNotWord = srcNotWord
507+
let dstNotWord = src
508508
% else:
509-
let dstNotWord = Builtin.trunc_Int${srcBits}_Int${bits}(srcNotWord)
509+
let dstNotWord = Builtin.trunc_Int${srcBits}_Int${bits}(src)
510510
% end
511511
%
512512
self._value = dstNotWord

0 commit comments

Comments
 (0)