Fix formatting

This commit is contained in:
igor725 2024-03-18 22:48:02 +03:00
parent bbd9a04f32
commit d994060ac9
No known key found for this signature in database
GPG Key ID: 46F13BBE46F8569D
4 changed files with 8 additions and 16 deletions

View File

@ -1,6 +1,6 @@
#include "common.h"
#include "logging.h"
#include "config_emu.h"
#include "logging.h"
#include "types.h"
#include <SDL.h>

View File

@ -42,9 +42,7 @@ std::pair<boost::unique_lock<boost::mutex>, json*> Config::accessModule(ConfigMo
case ConfigModFlag::AUDIO: m_future_audio.wait(); return std::make_pair(boost::unique_lock(m_mutex_audio), &m_audio);
case ConfigModFlag::CONTROLS: m_future_controls.wait(); return std::make_pair(boost::unique_lock(m_mutex_controls), &m_controls);
default:
printf("Invalid bit flag!\n");
exit(1);
default: printf("Invalid bit flag!\n"); exit(1);
}
}
@ -115,8 +113,8 @@ Config::Config() {
if (should_resave && dflag != ConfigModFlag::NONE) this->save((uint32_t)dflag);
};
m_future_logging = std::async(std::launch::async, load, std::string_view("logging.json"), &m_logging, json({{"sink", "FileTxt"}, {"verbosity", 1}}),
ConfigModFlag::LOGGING);
m_future_logging =
std::async(std::launch::async, load, std::string_view("logging.json"), &m_logging, json({{"sink", "FileTxt"}, {"verbosity", 1}}), ConfigModFlag::LOGGING);
m_future_graphics = std::async(std::launch::async, load, std::string_view("graphics.json"), &m_graphics, json({}), ConfigModFlag::GRAPHICS);
m_future_audio =
std::async(std::launch::async, load, std::string_view("audio.json"), &m_audio, json({{"volume", 0.5f}, {"device", "[default]"}}), ConfigModFlag::AUDIO);

View File

@ -66,7 +66,7 @@ std::string hexId2nid(std::string_view hexId) {
int main(int argc, char* argv[]) {
if (argc != 3) {
printf("Wrong argument count: filepath, symbolFolder");
printf("Wrong argument count: filepath, symbolFolder\n");
return -1;
}

View File

@ -42,17 +42,11 @@ const wchar_t* getParams(std::wstring& params) {
int tempi;
switch (jsontype) {
case json::value_t::string:
field->get_to(temp);
break;
case json::value_t::string: field->get_to(temp); break;
case json::value_t::number_integer:
temp = std::to_string(field->get_to(tempi));
break;
case json::value_t::number_integer: temp = std::to_string(field->get_to(tempi)); break;
default:
printf("Missing type handler for json_t(%d)!", (int)jsontype);
return false;
default: printf("Missing type handler for json_t(%d)!\n", (int)jsontype); return false;
}
params.append(L" ");