Use pre-increment on iterators
V803 Decreased performance. In case 'userEnd' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. futils.cpp 405 V803 Decreased performance. In case 'authEnd' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. futils.cpp 410 V803 Decreased performance. In case 'hostEnd' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. futils.cpp 428 V803 Decreased performance. In case 'e' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 711 V803 Decreased performance. In case 'e' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 841 V803 Decreased performance. In case 'e' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 958 V803 Decreased performance. In case 'i' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. epsimage.cpp 855 V803 Decreased performance. In case 'it' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. jpgimage.cpp 817 V803 Decreased performance. In case 'lib' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. version.cpp 508 V803 Decreased performance. In case 'it' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. version.cpp 563 V803 Decreased performance. In case 'it' is iterator it's more effective to use prefix form of increment. Replace iterator++ with ++iterator. xmpsidecar.cpp 138
This commit is contained in:
+3
-3
@@ -411,12 +411,12 @@ namespace Exiv2 {
|
||||
iterator_t userEnd = std::find(authStart, authEnd, ':');
|
||||
if (userEnd != authEnd) {
|
||||
result.Username = std::string(userStart, userEnd);
|
||||
userEnd++;
|
||||
++userEnd;
|
||||
result.Password = std::string(userEnd, authEnd);
|
||||
} else {
|
||||
result.Username = std::string(authStart, authEnd);
|
||||
}
|
||||
authEnd++;
|
||||
++authEnd;
|
||||
} else {
|
||||
authEnd = protocolEnd;
|
||||
}
|
||||
@@ -434,7 +434,7 @@ namespace Exiv2 {
|
||||
// port
|
||||
if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')) // we have a port
|
||||
{
|
||||
hostEnd++;
|
||||
++hostEnd;
|
||||
iterator_t portEnd = (pathStart != uriEnd) ? pathStart : queryStart;
|
||||
result.Port = std::string(hostEnd, portEnd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user