[XAM] Fixed issue with lack of property modification

This commit is contained in:
Gliniak 2024-09-21 18:55:51 +02:00
parent 12bf52b363
commit abc1d4aefa
2 changed files with 4 additions and 4 deletions

View File

@ -214,9 +214,9 @@ void UserProfile::SaveSetting(UserSetting* setting) {
bool UserProfile::AddProperty(const Property* property) {
// Find if property already exits
const Property* entry = GetProperty(property->GetPropertyId());
Property* entry = GetProperty(property->GetPropertyId());
if (entry) {
entry = property;
*entry = *property;
return true;
}
@ -224,7 +224,7 @@ bool UserProfile::AddProperty(const Property* property) {
return true;
}
const Property* UserProfile::GetProperty(const AttributeKey id) const {
Property* UserProfile::GetProperty(const AttributeKey id) {
for (auto& entry : properties_) {
if (entry.GetPropertyId().value != id.value) {
continue;

View File

@ -164,7 +164,7 @@ class UserProfile {
UserSetting* GetSetting(uint32_t setting_id);
bool AddProperty(const Property* property);
const Property* GetProperty(const AttributeKey id) const;
Property* GetProperty(const AttributeKey id);
std::map<uint32_t, uint32_t> contexts_;