clang-tidy: simplify bools

Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
main
Rosen Penev 4 years ago committed by Christoph Hasse
parent c20394b3fa
commit e9309f25ab

@ -232,7 +232,10 @@ namespace Exiv2 {
@brief Erase iccProfile. the profile is not removed from @brief Erase iccProfile. the profile is not removed from
the actual image until the writeMetadata() method is called. the actual image until the writeMetadata() method is called.
*/ */
virtual bool iccProfileDefined() { return iccProfile_.size_?true:false;} virtual bool iccProfileDefined()
{
return iccProfile_.size_ != 0;
}
/*! /*!
@brief return iccProfile @brief return iccProfile

@ -505,7 +505,7 @@ namespace Exiv2 {
{ {
std::istringstream is(s); std::istringstream is(s);
T tmp; T tmp;
ok = (is >> tmp) ? true : false; ok = bool(is >> tmp);
std::string rest; std::string rest;
is >> std::skipws >> rest; is >> std::skipws >> rest;
if (!rest.empty()) ok = false; if (!rest.empty()) ok = false;

Loading…
Cancel
Save