diff --git a/Modules/IO/GE/src/itkGE5ImageIO.cxx b/Modules/IO/GE/src/itkGE5ImageIO.cxx index cfd2f72d1a4..d98bfcf0bbb 100644 --- a/Modules/IO/GE/src/itkGE5ImageIO.cxx +++ b/Modules/IO/GE/src/itkGE5ImageIO.cxx @@ -272,7 +272,7 @@ GE5ImageIO::ReadHeader(const char * FileNameToRead) // patient id std::string tmpId(buffer.get() + VOff(84, 88), 13); - (void)std::remove(tmpId.begin(), tmpId.end(), '-'); + tmpId.erase(std::remove(tmpId.begin(), tmpId.end(), '-'), tmpId.end()); strncpy(curImage->patientId, tmpId.c_str(), sizeof(curImage->patientId) - 1); curImage->patientId[sizeof(curImage->patientId) - 1] = '\0';