diff --git a/src/Profile.cpp b/src/Profile.cpp index 066a2f77f3..eb2c09ba04 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -1073,14 +1073,13 @@ XNode* Profile::SaveGeneralDataCreateNode() const { XNode* pUnlocks = pGeneralDataNode->AppendChild("Unlocks"); - FOREACHS_CONST( RString, m_UnlockedEntryIDs, it ) + for (RString const unlockEntry : m_UnlockedEntryIDs) { XNode *pEntry = pUnlocks->AppendChild("UnlockEntry"); - RString sUnlockEntry = it->c_str(); - pEntry->AppendAttr( "UnlockEntryID", sUnlockEntry ); + pEntry->AppendAttr( "UnlockEntryID", unlockEntry ); if( !UNLOCK_AUTH_STRING.GetValue().empty() ) { - RString sUnlockAuth = BinaryToHex( CRYPTMAN->GetMD5ForString(sUnlockEntry + UNLOCK_AUTH_STRING.GetValue()) ); + RString sUnlockAuth = BinaryToHex( CRYPTMAN->GetMD5ForString(unlockEntry + UNLOCK_AUTH_STRING.GetValue()) ); pEntry->AppendAttr( "Auth", sUnlockAuth ); } }