Improve NextAfter. NFC.

pull/459/head
Ryan Pavlik 2019-05-23 15:16:12 -05:00 committed by whitequark
parent 533ca618eb
commit b284e80785
1 changed files with 1 additions and 1 deletions

View File

@ -460,7 +460,7 @@ public:
}
T *NextAfter(T *prev) {
if(IsEmpty() || !prev) return NULL;
if(prev - elem == (n - 1)) return NULL;
if(prev - First() == (n - 1)) return NULL;
return prev + 1;
}