mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:03:03 +01:00
Remove unneeded comparsions
This commit is contained in:
parent
9cce4f2257
commit
a705c5da0c
@ -185,10 +185,8 @@ namespace Firebird {
|
||||
if (lastpos < 0) {
|
||||
return npos;
|
||||
}
|
||||
if (pos != npos) {
|
||||
if (pos < lastpos) {
|
||||
lastpos = pos;
|
||||
}
|
||||
if (pos < lastpos) {
|
||||
lastpos = pos;
|
||||
}
|
||||
const_pointer start = c_str();
|
||||
const_pointer end = &start[lastpos];
|
||||
@ -205,10 +203,8 @@ namespace Firebird {
|
||||
if (lastpos < 0) {
|
||||
return npos;
|
||||
}
|
||||
if (pos != npos) {
|
||||
if (pos < lastpos) {
|
||||
lastpos = pos;
|
||||
}
|
||||
if (pos < lastpos) {
|
||||
lastpos = pos;
|
||||
}
|
||||
const_pointer start = c_str();
|
||||
const_pointer end = &start[lastpos];
|
||||
@ -234,7 +230,7 @@ namespace Firebird {
|
||||
AbstractString::size_type AbstractString::find_last_of(const_pointer s, size_type pos, size_type n) const {
|
||||
strBitMask sm(s, n);
|
||||
int lpos = length() - 1;
|
||||
if (pos != npos && pos < lpos) {
|
||||
if (pos < lpos) {
|
||||
lpos = pos;
|
||||
}
|
||||
const_pointer p = &c_str()[lpos];
|
||||
@ -260,7 +256,7 @@ namespace Firebird {
|
||||
AbstractString::size_type AbstractString::find_last_not_of(const_pointer s, size_type pos, size_type n) const {
|
||||
strBitMask sm(s, n);
|
||||
int lpos = length() - 1;
|
||||
if (pos != npos && pos < lpos) {
|
||||
if (pos < lpos) {
|
||||
lpos = pos;
|
||||
}
|
||||
const_pointer p = &c_str()[lpos];
|
||||
|
Loading…
Reference in New Issue
Block a user