Skip to content

Commit

Permalink
fix merge conflicts from mergify backport
Browse files Browse the repository at this point in the history
  • Loading branch information
hassec committed Jun 27, 2021
1 parent 3c81b18 commit 1e57a35
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions src/value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,7 @@ namespace Exiv2 {
Rational DataValue::toRational(long n) const
{
ok_ = true;
<<<<<<< HEAD
return {value_[n], 1};
=======
return Rational(value_.at(n), 1);
>>>>>>> f4d3adbf (fix: use vector::at() rather than operator[] (#1735))
return {value_.at(n), 1};
}

StringValueBase::StringValueBase(TypeId typeId)
Expand Down Expand Up @@ -312,11 +308,7 @@ namespace Exiv2 {
Rational StringValueBase::toRational(long n) const
{
ok_ = true;
<<<<<<< HEAD
return {value_[n], 1};
=======
return Rational(value_.at(n), 1);
>>>>>>> f4d3adbf (fix: use vector::at() rather than operator[] (#1735))
return {value_.at(n), 1};
}

StringValue::StringValue()
Expand Down Expand Up @@ -348,12 +340,9 @@ namespace Exiv2 {
{
value_ = buf;
// ensure count>0 and nul terminated # https://github.com/Exiv2/exiv2/issues/1484
<<<<<<< HEAD
if (value_.empty() || value_[value_.size() - 1] != '\0')
if (value_.empty() || value_.at(value_.size() - 1) != '\0') {
value_ += '\0';
=======
if (value_.size() == 0 || value_.at(value_.size()-1) != '\0') value_ += '\0';
>>>>>>> f4d3adbf (fix: use vector::at() rather than operator[] (#1735))
}
return 0;
}

Expand Down Expand Up @@ -1205,4 +1194,4 @@ namespace Exiv2 {
return {toLong(n), 1};
}

} // namespace Exiv2
} // namespace Exiv2

0 comments on commit 1e57a35

Please sign in to comment.