Skip to content

Commit

Permalink
Clarify auto type for MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
mabraham committed Sep 5, 2024
1 parent b48a0e9 commit 0120c0d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/gromacs/hardware/tests/device_management.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,30 +112,30 @@ std::string uuidToString(const std::array<std::byte, 16>& uuid)
// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where every x represents 4 bits
std::string result;
result.reserve(37);
const auto* uuidIt = uuid.cbegin();
const unsigned int* uuidIt = uuid.cbegin();
for (int i = 0; i < 4; ++i, ++uuidIt)
{
result += gmx::formatString("%2.2x", static_cast<unsigned int>(*uuidIt));
result += gmx::formatString("%2.2x", *uuidIt);
}
result.append(1, '-');
for (int i = 0; i < 2; ++i, ++uuidIt)
{
result += gmx::formatString("%2.2x", static_cast<unsigned int>(*uuidIt));
result += gmx::formatString("%2.2x", *uuidIt);
}
result.append(1, '-');
for (int i = 0; i < 2; ++i, ++uuidIt)
{
result += gmx::formatString("%2.2x", static_cast<unsigned int>(*uuidIt));
result += gmx::formatString("%2.2x", *uuidIt);
}
result.append(1, '-');
for (int i = 0; i < 2; ++i, ++uuidIt)
{
result += gmx::formatString("%2.2x", static_cast<unsigned int>(*uuidIt));
result += gmx::formatString("%2.2x", *uuidIt);
}
result.append(1, '-');
for (int i = 0; i < 6; ++i, ++uuidIt)
{
result += gmx::formatString("%2.2x", static_cast<unsigned int>(*uuidIt));
result += gmx::formatString("%2.2x", *uuidIt);
}
return result;
}
Expand Down

0 comments on commit 0120c0d

Please sign in to comment.