mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-06-07 09:45:55 +02:00
Indentation
This commit is contained in:
parent
e316360012
commit
3e22b28173
1 changed files with 18 additions and 18 deletions
|
@ -831,25 +831,25 @@ static void parse_leaderboards(class Settings *settings_client, class Settings *
|
||||||
// stats.json
|
// stats.json
|
||||||
static void parse_stats(class Settings *settings_client, class Settings *settings_server, class Local_Storage *local_storage)
|
static void parse_stats(class Settings *settings_client, class Settings *settings_server, class Local_Storage *local_storage)
|
||||||
{
|
{
|
||||||
nlohmann::json stats_items;
|
nlohmann::json stats_items;
|
||||||
std::string stats_json_path = Local_Storage::get_game_settings_path() + "stats.json";
|
std::string stats_json_path = Local_Storage::get_game_settings_path() + "stats.json";
|
||||||
if (local_storage->load_json(stats_json_path, stats_items)) {
|
if (local_storage->load_json(stats_json_path, stats_items)) {
|
||||||
for (const auto &stats : stats_items) {
|
for (const auto &stats : stats_items) {
|
||||||
std::string stat_name;
|
std::string stat_name;
|
||||||
std::string stat_type;
|
std::string stat_type;
|
||||||
std::string stat_default_value = "0";
|
std::string stat_default_value = "0";
|
||||||
std::string stat_global_value = "0";
|
std::string stat_global_value = "0";
|
||||||
|
|
||||||
try {
|
try {
|
||||||
stat_name = stats.value("name", std::string(""));
|
stat_name = stats.value("name", std::string(""));
|
||||||
stat_type = stats.value("type", std::string(""));
|
stat_type = stats.value("type", std::string(""));
|
||||||
stat_default_value = stats.value("default", std::string("0"));
|
stat_default_value = stats.value("default", std::string("0"));
|
||||||
stat_global_value = stats.value("global", std::string("0"));
|
stat_global_value = stats.value("global", std::string("0"));
|
||||||
}
|
}
|
||||||
catch (const std::exception &e) {
|
catch (const std::exception &e) {
|
||||||
PRINT_DEBUG("Error reading current stat item in stats.json, reason: %s", e.what());
|
PRINT_DEBUG("Error reading current stat item in stats.json, reason: %s", e.what());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::transform(stat_type.begin(), stat_type.end(), stat_type.begin(),[](unsigned char c){ return std::tolower(c); });
|
std::transform(stat_type.begin(), stat_type.end(), stat_type.begin(),[](unsigned char c){ return std::tolower(c); });
|
||||||
struct Stat_config config = {};
|
struct Stat_config config = {};
|
||||||
|
|
Loading…
Add table
Reference in a new issue