Skip to content

Commit

Permalink
use erase_if
Browse files Browse the repository at this point in the history
Cast isspace to unsigned char for proper C API.

Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Jan 24, 2025
1 parent 755be60 commit c54f858
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/xmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ static XMP_Status nsDumper(void* refCon, XMP_StringPtr buffer, XMP_StringLen buf
std::string out(buffer, bufferSize);

// remove blanks: http://stackoverflow.com/questions/83439/remove-spaces-from-stdstring-in-c
out.erase(std::remove_if(out.begin(), out.end(), isspace), out.end());
std::erase_if(out, [](unsigned char c) { return std::isspace(c); });

bool bURI = Internal::contains(out, "http://");
bool bNS = Internal::contains(out, ':') && !bURI;
Expand Down

0 comments on commit c54f858

Please sign in to comment.