clang-tidy: empty() conversions
Found with readability-container-size-empty Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
9642e3cceb
commit
5d716c7df4
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user