[XAM] Fixed issue with lack of property modification
This commit is contained in:
parent
12bf52b363
commit
abc1d4aefa
|
@ -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;
|
||||
|
|
|
@ -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_;
|
||||
|
||||
|
|
Loading…
Reference in New Issue