Skip to content

Commit

Permalink
Use std::find_if rather than loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbackhouse authored and neheb committed Feb 21, 2025
1 parent b8f182c commit 10929a2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5033,8 +5033,7 @@ const XmpPropertyInfo* XmpProperties::propertyInfo(const XmpKey& key) {
std::string property = key.tagName();
// If property is a path for a nested property, determines the innermost element
if (auto i = property.find_last_of('/'); i != std::string::npos) {
for (; i != std::string::npos && !isalpha(property.at(i)); ++i) {
}
i = std::distance(property.begin(), std::find_if(property.begin() + i, property.end(), isalpha));
property = property.substr(i);
i = property.find_first_of(':');
if (i != std::string::npos) {
Expand Down

0 comments on commit 10929a2

Please sign in to comment.