simplify using C++11 syntax

This commit is contained in:
Axel Kohlmeyer
2021-02-04 11:04:50 -05:00
parent dadea34663
commit 3e07711739

View File

@ -236,7 +236,7 @@ namespace LAMMPS_NS {
inline bool has_utf8(const std::string &line)
{
const unsigned char * const in = (const unsigned char *)line.c_str();
for (int i=0; i < line.size(); ++i) if (in[i] & 0x80U) return true;
for (auto c : line) if (c & 0x80U) return true;
return false;
}