[XAM] Fixed issue with lack of property modification
This commit is contained in:
@@ -214,9 +214,9 @@ void UserProfile::SaveSetting(UserSetting* setting) {
|
|||||||
|
|
||||||
bool UserProfile::AddProperty(const Property* property) {
|
bool UserProfile::AddProperty(const Property* property) {
|
||||||
// Find if property already exits
|
// Find if property already exits
|
||||||
const Property* entry = GetProperty(property->GetPropertyId());
|
Property* entry = GetProperty(property->GetPropertyId());
|
||||||
if (entry) {
|
if (entry) {
|
||||||
entry = property;
|
*entry = *property;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,7 +224,7 @@ bool UserProfile::AddProperty(const Property* property) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Property* UserProfile::GetProperty(const AttributeKey id) const {
|
Property* UserProfile::GetProperty(const AttributeKey id) {
|
||||||
for (auto& entry : properties_) {
|
for (auto& entry : properties_) {
|
||||||
if (entry.GetPropertyId().value != id.value) {
|
if (entry.GetPropertyId().value != id.value) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ class UserProfile {
|
|||||||
UserSetting* GetSetting(uint32_t setting_id);
|
UserSetting* GetSetting(uint32_t setting_id);
|
||||||
|
|
||||||
bool AddProperty(const Property* property);
|
bool AddProperty(const Property* property);
|
||||||
const Property* GetProperty(const AttributeKey id) const;
|
Property* GetProperty(const AttributeKey id);
|
||||||
|
|
||||||
std::map<uint32_t, uint32_t> contexts_;
|
std::map<uint32_t, uint32_t> contexts_;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user