Skip to content

Commit

Permalink
fix shallow variable
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwuzw committed Jul 10, 2024
1 parent 41a1132 commit 3c536f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,12 @@ - (void)processTruncatedAttributedText:(NSTextStorage *)textStorage
usingBlock:^(
CGRect rect,
CGRect usedRect,
NSTextContainer *_Nonnull textContainer,
NSRange glyphRange,
NSTextContainer *_Nonnull _,
NSRange lineGlyphRange,
BOOL *_Nonnull stop) {
if (line == textContainer.maximumNumberOfLines - 1) {
NSRange truncatedRange = [layoutManager
truncatedGlyphRangeInLineFragmentForGlyphAtIndex:glyphRange.location];
truncatedGlyphRangeInLineFragmentForGlyphAtIndex:lineGlyphRange.location];

if (truncatedRange.location != NSNotFound && truncatedRange.location >= 1) {
// Remove color attributes for truncated range
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ - (void)processTruncatedAttributedText:(NSTextStorage *)textStorage
usingBlock:^(
CGRect rect,
CGRect usedRect,
NSTextContainer *_Nonnull textContainer,
NSRange glyphRange,
NSTextContainer *_Nonnull _,
NSRange lineGlyphRange,
BOOL *_Nonnull stop) {
if (line == textContainer.maximumNumberOfLines - 1) {
NSRange truncatedRange = [layoutManager
truncatedGlyphRangeInLineFragmentForGlyphAtIndex:glyphRange.location];
truncatedGlyphRangeInLineFragmentForGlyphAtIndex:lineGlyphRange.location];

if (truncatedRange.location != NSNotFound && truncatedRange.location >= 1) {
// Remove color attributes for truncated range
Expand Down

0 comments on commit 3c536f7

Please sign in to comment.