Skip to content

Commit

Permalink
lint: reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
xTVaser committed Feb 16, 2025
1 parent fe51ca8 commit e210126
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 40 deletions.
2 changes: 1 addition & 1 deletion common/formatter/formatter_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class FormatterTreeNode {

FormatterTreeNode() = default;
FormatterTreeNode(const std::string& source, const TSNode& node);
FormatterTreeNode(const Metadata& _metadata) : metadata(_metadata){};
FormatterTreeNode(const Metadata& _metadata) : metadata(_metadata) {};

bool is_list() const { return !token.has_value(); }
std::string token_str() const {
Expand Down
2 changes: 1 addition & 1 deletion common/global_profiler/GlobalProfiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class GlobalProfiler {
};

struct ScopedEvent {
ScopedEvent(GlobalProfiler* _prof) : prof(_prof){};
ScopedEvent(GlobalProfiler* _prof) : prof(_prof) {};
ScopedEvent(const ScopedEvent&) = delete;
ScopedEvent& operator=(const ScopedEvent&) = delete;
GlobalProfiler* prof = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion common/goos/TextDB.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class SourceText {
// want
virtual bool terminate_compiler_error() { return true; }

virtual ~SourceText(){};
virtual ~SourceText() {};

protected:
void build_offsets();
Expand Down
2 changes: 1 addition & 1 deletion common/repl/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void from_json(const json& j, KeyBind& obj);
// TODO - per-game config
struct Config {
GameVersion game_version;
Config(GameVersion _game_version) : game_version(_game_version){};
Config(GameVersion _game_version) : game_version(_game_version) {};

// this is the default REPL configuration
int nrepl_port = 8181;
Expand Down
12 changes: 3 additions & 9 deletions decompiler/config/jak3/ntsc_v1/type_casts.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -3160,9 +3160,7 @@
[27, "a0", "process-focusable"],
[30, "a0", "process-focusable"]
],
"(method 20 enemy)": [
[[0, 30], "v0", "search-info-flag"]
],
"(method 20 enemy)": [[[0, 30], "v0", "search-info-flag"]],
"(method 59 enemy)": [
[57, "a0", "process-focusable"],
[60, "a0", "process-focusable"]
Expand Down Expand Up @@ -3217,9 +3215,7 @@
[67, "s3", "process-drawable"],
[68, "a1", "collide-shape"]
],
"(method 68 enemy)": [
[[0, 50], "v0", "enemy-aware"]
],
"(method 68 enemy)": [[[0, 50], "v0", "enemy-aware"]],
"(method 82 enemy)": [
[80, "v1", "process-drawable"],
[122, "v1", "attack-info"],
Expand Down Expand Up @@ -9798,9 +9794,7 @@
[229, "v1", "ff-squad-control"],
[319, "a1", "ff-squad-control"]
],
"(method 252 crimson-guard)": [
[[0, 223], "s5", "process-focusable"]
],
"(method 252 crimson-guard)": [[[0, 223], "s5", "process-focusable"]],
"(method 51 ff-squad-control)": [
[13, "v1", "connection"],
[14, "v1", "collide-shape"],
Expand Down
18 changes: 9 additions & 9 deletions decompiler/config/jak3/ntsc_v1/var_names.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@
},
"(method 9 align-control)": {
"vars": {
"s5-0":"num-chans",
"s4-0":"chan-idx",
"a0-4":"chan",
"v1-7":"frame-group",
"a0-9":"root-chan",
"v1-18":"root-frame-group",
"f0-0":"root-frame-num",
"a0-10":"disable?"
"s5-0": "num-chans",
"s4-0": "chan-idx",
"a0-4": "chan",
"v1-7": "frame-group",
"a0-9": "root-chan",
"v1-18": "root-frame-group",
"f0-0": "root-frame-num",
"a0-10": "disable?"
}
},
"(method 9 process)": {
Expand All @@ -192,7 +192,7 @@
"args": ["this", "ent"]
},
"(method 106 bot)": {
"vars": {"v1-3": ["v1-3", "process-focusable"]}
"vars": { "v1-3": ["v1-3", "process-focusable"] }
},
"(method 0 clock)": {
"args": ["allocation", "type-to-make", "index"]
Expand Down
2 changes: 1 addition & 1 deletion decompiler/util/data_decompile.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ struct ArrayFieldDecompMeta {
ArrayFieldDecompMeta(TypeSpec _element_type,
int _bytes_per_element,
Kind _kind = Kind::REF_TO_INLINE_ARR)
: element_type(_element_type), bytes_per_element(_bytes_per_element), kind(_kind){};
: element_type(_element_type), bytes_per_element(_bytes_per_element), kind(_kind) {};
};

extern const std::unordered_map<
Expand Down
2 changes: 1 addition & 1 deletion game/system/hid/devices/input_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class InputDevice {
std::shared_ptr<game_settings::InputSettings> m_settings;

public:
virtual ~InputDevice(){};
virtual ~InputDevice() {};

virtual void process_event(const SDL_Event& event,
const CommandBindingGroups& commands,
Expand Down
2 changes: 1 addition & 1 deletion game/system/hid/devices/keyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct ActiveKeyboardAction {

class KeyboardDevice : public InputDevice {
public:
KeyboardDevice(){};
KeyboardDevice() {};
KeyboardDevice(std::shared_ptr<game_settings::InputSettings> settings);
~KeyboardDevice() {}

Expand Down
2 changes: 1 addition & 1 deletion game/system/hid/devices/mouse.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class MouseDevice : public InputDevice {
bool mouse5 = false;
};

MouseDevice(){};
MouseDevice() {};
MouseDevice(std::shared_ptr<game_settings::InputSettings> settings);
~MouseDevice() {}

Expand Down
8 changes: 4 additions & 4 deletions game/system/hid/input_bindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ void from_json(const json& j, InputModifiers& obj);
/// should make him move towards the camera.
struct InputBinding {
InputBinding() = default;
InputBinding(int index) : pad_data_index(index){};
InputBinding(int index) : pad_data_index(index) {};
InputBinding(int index, const std::optional<InputModifiers> _modifiers) : pad_data_index(index) {
if (_modifiers) {
modifiers = _modifiers.value();
}
};
InputBinding(int index, bool _minimum_in_range)
: pad_data_index(index), minimum_in_range(_minimum_in_range){};
: pad_data_index(index), minimum_in_range(_minimum_in_range) {};
InputBinding(int index, bool _minimum_in_range, const std::optional<InputModifiers> _modifiers)
: pad_data_index(index), minimum_in_range(_minimum_in_range) {
if (_modifiers) {
Expand Down Expand Up @@ -262,7 +262,7 @@ struct InputBindingGroups {
: device_type(_device_type),
analog_axii(_analog_axii),
button_axii(_button_axii),
buttons(_buttons){};
buttons(_buttons) {};

// TODO - make these private
InputDeviceType device_type;
Expand Down Expand Up @@ -345,7 +345,7 @@ struct CommandBinding {
enum Source { CONTROLLER, KEYBOARD, MOUSE };

CommandBinding(const u32 _host_key, std::function<void()> _command)
: host_key(_host_key), command(_command){};
: host_key(_host_key), command(_command) {};
u32 host_key;
std::function<void()> command;
InputModifiers modifiers;
Expand Down
2 changes: 1 addition & 1 deletion lsp/protocol/common_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct Range {
Position m_start;
Position m_end;

Range(){};
Range() {};
Range(Position start, Position end);
// point constructor
Range(uint32_t line, uint32_t character);
Expand Down
4 changes: 2 additions & 2 deletions lsp/state/workspace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ extern const TSLanguage* tree_sitter_opengoal();

const TSLanguage* g_opengoalLang = tree_sitter_opengoal();

Workspace::Workspace(){};
Workspace::~Workspace(){};
Workspace::Workspace() {};
Workspace::~Workspace() {};

bool Workspace::is_initialized() {
return m_initialized;
Expand Down
8 changes: 4 additions & 4 deletions lsp/state/workspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct OGGlobalIndex {

class WorkspaceOGFile {
public:
WorkspaceOGFile(){};
WorkspaceOGFile() {};
WorkspaceOGFile(const LSPSpec::DocumentUri& uri,
const std::string& content,
const GameVersion& game_version);
Expand All @@ -62,7 +62,7 @@ class WorkspaceOGFile {

class WorkspaceIRFile {
public:
WorkspaceIRFile(){};
WorkspaceIRFile() {};
WorkspaceIRFile(const std::string& content);
// TODO - make private
int32_t version;
Expand Down Expand Up @@ -91,14 +91,14 @@ class WorkspaceIRFile {
class WorkspaceAllTypesFile {
public:
WorkspaceAllTypesFile()
: m_dts(std::make_unique<decompiler::DecompilerTypeSystem>(GameVersion::Jak1)){};
: m_dts(std::make_unique<decompiler::DecompilerTypeSystem>(GameVersion::Jak1)) {};
WorkspaceAllTypesFile(const LSPSpec::DocumentUri& uri,
const GameVersion version,
const fs::path file_path)
: m_game_version(version),
m_uri(uri),
m_dts(std::make_unique<decompiler::DecompilerTypeSystem>(m_game_version)),
m_file_path(file_path){};
m_file_path(file_path) {};

GameVersion m_game_version;
LSPSpec::DocumentUri m_uri;
Expand Down
4 changes: 2 additions & 2 deletions test/offline/framework/file_management.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct OfflineTestSourceFile {
: path(_path),
containing_dgo(_containing_dgo),
name_in_dgo(_name_in_dgo),
unique_name(_unique_name){};
unique_name(_unique_name) {};
fs::path path;
std::string containing_dgo;
std::string name_in_dgo;
Expand All @@ -24,7 +24,7 @@ struct OfflineTestArtFile {
OfflineTestArtFile(std::string _containing_dgo,
std::string _name_in_dgo,
std::string _unique_name)
: containing_dgo(_containing_dgo), name_in_dgo(_name_in_dgo), unique_name(_unique_name){};
: containing_dgo(_containing_dgo), name_in_dgo(_name_in_dgo), unique_name(_unique_name) {};
std::string containing_dgo;
std::string name_in_dgo;
std::string unique_name;
Expand Down
2 changes: 1 addition & 1 deletion test/offline/framework/orchestration.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class OfflineTestThreadStatus {
public:
enum class Stage { IDLE, PREPARING, DECOMPILING, COMPARING, COMPILING, FAILED, FINISHED };

OfflineTestThreadStatus(const OfflineTestConfig& _config) : config(_config){};
OfflineTestThreadStatus(const OfflineTestConfig& _config) : config(_config) {};

Stage stage = Stage::IDLE;
uint32_t total_steps = 0;
Expand Down

0 comments on commit e210126

Please sign in to comment.