Skip to content

Commit 7e13a05

Browse files
committed
style: prefer nullptr to 0 in QCString::find()
1 parent 2ada9ac commit 7e13a05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/qcstring.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ int QCString::find( char c, int index, bool cs ) const
5353
pos = data()+index;
5454
c = toLowerChar(c);
5555
while (*pos && toLowerChar(*pos)!=c) pos++;
56-
if (!*pos && c) pos=0; // not found
56+
if (!*pos && c) pos=nullptr; // not found
5757
}
5858
return pos ? static_cast<int>(pos - data()) : -1;
5959
}
@@ -78,7 +78,7 @@ int QCString::find( const char *str, int index, bool cs ) const
7878
if (qstrnicmp(pos,str,len)==0) break;
7979
pos++;
8080
}
81-
if (!*pos) pos = 0; // not found
81+
if (!*pos) pos = nullptr; // not found
8282
}
8383
return pos ? static_cast<int>(pos - data()) : -1;
8484
}

0 commit comments

Comments
 (0)