clang-tidy: empty() conversions

Found with readability-container-size-empty

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2021-04-27 00:15:47 -07:00 committed by Luis Díaz Más
parent 9642e3cceb
commit 5d716c7df4
2 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@ void httpcon(const std::string& url, bool useHttp1_0 = false) {
if (!useHttp1_0) request["version"] = "1.1";
int serverCode = Exiv2::http(request,response,errors);
if (serverCode < 0 || serverCode >= 400 || errors != "") {
if (serverCode < 0 || serverCode >= 400 || !errors.empty()) {
throw Exiv2::Error(Exiv2::kerTiffDirectoryTooLarge, "Server", serverCode);
}
}

View File

@ -2072,7 +2072,7 @@ namespace Exiv2 {
request["port"] = hostInfo_.Port;
request["verb"] = "HEAD";
int serverCode = http(request, response, errors);
if (serverCode < 0 || serverCode >= 400 || errors != "") {
if (serverCode < 0 || serverCode >= 400 || !errors.empty()) {
throw Error(kerFileOpenFailed, "http",Exiv2::Internal::stringFormat("%d",serverCode), hostInfo_.Path);
}
@ -2097,7 +2097,7 @@ namespace Exiv2 {
}
int serverCode = http(request, responseDic, errors);
if (serverCode < 0 || serverCode >= 400 || errors != "") {
if (serverCode < 0 || serverCode >= 400 || !errors.empty()) {
throw Error(kerFileOpenFailed, "http",Exiv2::Internal::stringFormat("%d",serverCode), hostInfo_.Path);
}
response = responseDic["body"];
@ -2150,7 +2150,7 @@ namespace Exiv2 {
request["header"] = ss.str();
int serverCode = http(request, response, errors);
if (serverCode < 0 || serverCode >= 400 || errors != "") {
if (serverCode < 0 || serverCode >= 400 || !errors.empty()) {
throw Error(kerFileOpenFailed, "http",Exiv2::Internal::stringFormat("%d",serverCode), hostInfo_.Path);
}
}