Skip to content

Commit

Permalink
Fixing build warning for an impossible condition check
Browse files Browse the repository at this point in the history
  • Loading branch information
jmkk committed Nov 28, 2017
1 parent 3b71b75 commit a8076c0
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Hakawai/Mentions/HKWMentionsPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -1258,16 +1258,9 @@ - (void)advanceStateForInsertionChanged:(unichar)precedingChar
case HKWMentionsStateQuiescent: {
NSRange mentionRange;
HKWMentionsAttribute *precedingMention = nil;
if (location >= 0) {
// Look for a preceding mention, but only if we're at the beginning of the text range
precedingMention = [self mentionAttributePrecedingLocation:location
range:&mentionRange];
}
else {
NSAssert(precedingChar == (unichar)0,
@"Logic error: at beginning of document, but preceding character is not null");
return;
}
// Look for a preceding mention, but only if we're at the beginning of the text range
precedingMention = [self mentionAttributePrecedingLocation:location
range:&mentionRange];
if (precedingMention) {
// A mention was found.
self.currentlySelectedMention = precedingMention;
Expand Down

0 comments on commit a8076c0

Please sign in to comment.