diff --git a/src/docker.cpp b/src/docker.cpp index 417c68e0..bfd846e7 100644 --- a/src/docker.cpp +++ b/src/docker.cpp @@ -10,7 +10,6 @@ static constexpr bool VERBOSE_CMD = true; using namespace godot; - static bool ContainerIsAlreadyRunning(String container_name) { godot::OS *OS = godot::OS::get_singleton(); PackedStringArray arguments = { "container", "inspect", "-f", "{{.State.Running}}", container_name }; diff --git a/src/elf/script_instance.cpp b/src/elf/script_instance.cpp index a2757bf4..98a3c0ba 100644 --- a/src/elf/script_instance.cpp +++ b/src/elf/script_instance.cpp @@ -160,13 +160,12 @@ GDExtensionMethodInfo create_method_info(const MethodInfo &method_info) { return GDExtensionMethodInfo{ .name = stringname_alloc(method_info.name), .return_value = GDExtensionPropertyInfo{ - .type = GDEXTENSION_VARIANT_TYPE_OBJECT, - .name = stringname_alloc(method_info.return_val.name), - .class_name = stringname_alloc(method_info.return_val.class_name), - .hint = method_info.return_val.hint, - .hint_string = stringname_alloc(method_info.return_val.hint_string), - .usage = method_info.return_val.usage - }, + .type = GDEXTENSION_VARIANT_TYPE_OBJECT, + .name = stringname_alloc(method_info.return_val.name), + .class_name = stringname_alloc(method_info.return_val.class_name), + .hint = method_info.return_val.hint, + .hint_string = stringname_alloc(method_info.return_val.hint_string), + .usage = method_info.return_val.usage }, .flags = method_info.flags, .id = method_info.id, .argument_count = (uint32_t)method_info.arguments.size(), diff --git a/src/guest_datatypes.h b/src/guest_datatypes.h index 395c0bde..d550fcbb 100644 --- a/src/guest_datatypes.h +++ b/src/guest_datatypes.h @@ -9,21 +9,21 @@ struct GDNativeVariant { uint8_t padding[7]; union { struct { - double flt; - uint64_t flt_padding1; + double flt; + uint64_t flt_padding1; }; struct { - uint64_t value; - uint64_t i64_padding; + uint64_t value; + uint64_t i64_padding; }; struct { - real_t vec2_flt[2]; + real_t vec2_flt[2]; }; struct { - int32_t ivec2_int[2]; + int32_t ivec2_int[2]; }; struct { - uint64_t object_id; + uint64_t object_id; GodotObject *object_ptr; }; }; diff --git a/src/rust/script_rust.h b/src/rust/script_rust.h index a42973bf..b0e04d78 100644 --- a/src/rust/script_rust.h +++ b/src/rust/script_rust.h @@ -71,7 +71,7 @@ class RustScript : public ScriptExtension { DockerContainerStart(); if (docker_container_version == 0) docker_container_version = - Docker::ContainerVersion(docker_container_name, { "/usr/project/build.sh", "--version" }); + Docker::ContainerVersion(docker_container_name, { "/usr/project/build.sh", "--version" }); return docker_container_version; } static bool DockerContainerExecute(const PackedStringArray &p_arguments, Array &output) { diff --git a/src/sandbox.cpp b/src/sandbox.cpp index 1ac75f3a..58425b7b 100644 --- a/src/sandbox.cpp +++ b/src/sandbox.cpp @@ -1,12 +1,12 @@ #include "sandbox.h" #include "guest_datatypes.h" +#include "sandbox_project_settings.h" #include #include #include #include #include -#include "sandbox_project_settings.h" using namespace godot; @@ -206,7 +206,7 @@ Variant Sandbox::vmcall_fn(const StringName &function, const Variant **args, GDE void Sandbox::setup_arguments_native(gaddr_t arrayDataPtr, GuestVariant *v, const Variant **args, int argc) { // In this mode we will try to use registers when possible // The stack is already set up from setup_arguments(), so we just need to set up the registers - auto& machine = this->machine(); + machine_t &machine = this->machine(); int index = 11; int flindex = 10; diff --git a/src/sandbox.h b/src/sandbox.h index 098fc484..69752d51 100644 --- a/src/sandbox.h +++ b/src/sandbox.h @@ -283,7 +283,7 @@ class Sandbox : public Node { // State stack, with the permanent (initial) state at index 0. // That means eg. static Variant values are held stored in the state at index 0, // so that they can be accessed by future VM calls, and not lost when a call ends. - std::array m_states; + std::array m_states; // Properties mutable std::vector m_properties; diff --git a/src/sandbox_exception.cpp b/src/sandbox_exception.cpp index e30f30b0..fe407e14 100644 --- a/src/sandbox_exception.cpp +++ b/src/sandbox_exception.cpp @@ -1,7 +1,7 @@ #include "sandbox.h" -#include #include "cpp/script_cpp.h" +#include static constexpr bool VERBOSE_EXCEPTIONS = false; @@ -83,4 +83,3 @@ void Sandbox::print_backtrace(const gaddr_t addr) { "-> [-] 0x", to_hex(origin.address), " + 0x", to_hex(origin.offset), ": ", name); } - diff --git a/tests/tests/test_basic.cpp b/tests/tests/test_basic.cpp index 65efa2d5..b19bb2fb 100644 --- a/tests/tests/test_basic.cpp +++ b/tests/tests/test_basic.cpp @@ -48,7 +48,6 @@ extern "C" Variant test_sub_dictionary(Dictionary dict) { return Dictionary(dict)["1"]; } - extern "C" Variant test_object(Object arg) { return arg; } @@ -62,7 +61,7 @@ static bool timer_got_called = false; extern "C" Variant test_timers() { long val1 = 11; float val2 = 22.0f; - return Timer::native_periodic(0.01, [=] (Node timer) -> Variant { + return Timer::native_periodic(0.01, [=](Node timer) -> Variant { print("Timer with values: ", val1, val2); timer.queue_free(); timer_got_called = true;