clang-tidy: no else after return
Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
c2be02145d
commit
84555f1ad5
@ -749,9 +749,8 @@ int Params::evalDelete(const std::string& optArg) {
|
||||
if (rc > 0) {
|
||||
target_ |= static_cast<CommonTarget>(rc);
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
default:
|
||||
std::cerr << progname() << ": " << _("Option -d is not compatible with a previous option\n");
|
||||
@ -771,9 +770,8 @@ int Params::evalExtract(const std::string& optArg) {
|
||||
if (rc > 0) {
|
||||
target_ |= static_cast<CommonTarget>(rc);
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
default:
|
||||
std::cerr << progname() << ": " << _("Option -e is not compatible with a previous option\n");
|
||||
@ -793,9 +791,8 @@ int Params::evalInsert(const std::string& optArg) {
|
||||
if (rc > 0) {
|
||||
target_ |= static_cast<CommonTarget>(rc);
|
||||
return 0;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
default:
|
||||
std::cerr << progname() << ": " << _("Option -i is not compatible with a previous option\n");
|
||||
|
||||
@ -178,7 +178,8 @@ byte* Exiv2::DataBuf::data(size_t offset) {
|
||||
const byte* Exiv2::DataBuf::c_data(size_t offset) const {
|
||||
if (pData_.empty()) {
|
||||
return nullptr;
|
||||
} else if (offset >= pData_.size()) {
|
||||
}
|
||||
if (offset >= pData_.size()) {
|
||||
throw std::out_of_range("Overflow in Exiv2::DataBuf::c_data");
|
||||
}
|
||||
return &pData_[offset];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user