Change: store crash logs in JSON format (#11232)

This commit is contained in:
Patric Stout
2023-09-14 20:13:27 +02:00
committed by GitHub
parent a0353af223
commit 37e2f99c09
14 changed files with 729 additions and 751 deletions

View File

@@ -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