Skip to content

Commit

Permalink
for range
Browse files Browse the repository at this point in the history
Signed-off-by: Rosen Penev <rosenp@gmail.com>
  • Loading branch information
neheb committed Jan 2, 2025
1 parent 209a724 commit 9abafc3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/exiv2/value.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1526,8 +1526,8 @@ int ValueType<T>::read(const std::string& buf) {
template <typename T>
size_t ValueType<T>::copy(byte* buf, ByteOrder byteOrder) const {
size_t offset = 0;
for (auto i = value_.begin(); i != value_.end(); ++i) {
offset += toData(buf + offset, *i, byteOrder);
for (const auto& val : value_) {
offset += toData(buf + offset, val, byteOrder);
}
return offset;
}
Expand Down
6 changes: 3 additions & 3 deletions src/iptc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ const char* IptcData::detectCharset() const {
bool ascii = true;
bool utf8 = true;

for (pos = begin(); pos != end(); ++pos) {
std::string value = pos->toString();
if (pos->value().ok()) {
for (const auto& key : *this) {
std::string value = key.toString();
if (key.value().ok()) {
int seqCount = 0;
for (auto c : value) {
if (seqCount) {
Expand Down

0 comments on commit 9abafc3

Please sign in to comment.