Change: store crash logs in JSON format (#11232)
This commit is contained in:
@@ -716,6 +716,12 @@ bool IntSettingDesc::IsSameValue(const IniItem *item, void *object) const
|
||||
return item_value == object_value;
|
||||
}
|
||||
|
||||
bool IntSettingDesc::IsDefaultValue(void *object) const
|
||||
{
|
||||
int32_t object_value = this->Read(object);
|
||||
return this->def == object_value;
|
||||
}
|
||||
|
||||
std::string StringSettingDesc::FormatValue(const void *object) const
|
||||
{
|
||||
const std::string &str = this->Read(object);
|
||||
@@ -742,12 +748,24 @@ bool StringSettingDesc::IsSameValue(const IniItem *item, void *object) const
|
||||
return item->value->compare(str) == 0;
|
||||
}
|
||||
|
||||
bool StringSettingDesc::IsDefaultValue(void *object) const
|
||||
{
|
||||
const std::string &str = this->Read(object);
|
||||
return this->def == str;
|
||||
}
|
||||
|
||||
bool ListSettingDesc::IsSameValue(const IniItem *item, void *object) const
|
||||
{
|
||||
/* Checking for equality is way more expensive than just writing the value. */
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ListSettingDesc::IsDefaultValue(void *object) const
|
||||
{
|
||||
/* Defaults of lists are often complicated, and hard to compare. */
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads all items from a 'grpname' section into a list
|
||||
* The list parameter can be a nullptr pointer, in this case nothing will be
|
||||
|
Reference in New Issue
Block a user