diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_class_db.h | 6 | ||||
| -rw-r--r-- | tests/test_math.cpp | 2 | ||||
| -rw-r--r-- | tests/test_physics_2d.cpp | 2 | ||||
| -rw-r--r-- | tests/test_physics_3d.cpp | 4 | ||||
| -rw-r--r-- | tests/test_render.cpp | 6 |
5 files changed, 10 insertions, 10 deletions
diff --git a/tests/test_class_db.h b/tests/test_class_db.h index e67b2de66a..ea680da5d6 100644 --- a/tests/test_class_db.h +++ b/tests/test_class_db.h @@ -559,7 +559,7 @@ void add_exposed_classes(Context &r_context) { ClassDB::get_method_list(class_name, &method_list, true); method_list.sort(); - for (MethodInfo &E : method_list) { + for (const MethodInfo &E : method_list) { const MethodInfo &method_info = E; int argc = method_info.arguments.size(); @@ -827,7 +827,7 @@ void add_global_enums(Context &r_context) { } } - for (EnumData &E : r_context.global_enums) { + for (const EnumData &E : r_context.global_enums) { r_context.enum_types.push_back(E.name); } } @@ -838,7 +838,7 @@ void add_global_enums(Context &r_context) { hardcoded_enums.push_back("Vector2i.Axis"); hardcoded_enums.push_back("Vector3.Axis"); hardcoded_enums.push_back("Vector3i.Axis"); - for (StringName &E : hardcoded_enums) { + for (const StringName &E : hardcoded_enums) { // These enums are not generated and must be written manually (e.g.: Vector3.Axis) // Here, we assume core types do not begin with underscore r_context.enum_types.push_back(E); diff --git a/tests/test_math.cpp b/tests/test_math.cpp index d2960333cc..d0b9fdef4b 100644 --- a/tests/test_math.cpp +++ b/tests/test_math.cpp @@ -549,7 +549,7 @@ MainLoop *test() { List<StringName> tl; ClassDB::get_class_list(&tl); - for (StringName &E : tl) { + for (const StringName &E : tl) { Vector<uint8_t> m5b = E.operator String().md5_buffer(); hashes.push_back(hashes.size()); } diff --git a/tests/test_physics_2d.cpp b/tests/test_physics_2d.cpp index a9e2e92b34..40dc74e89c 100644 --- a/tests/test_physics_2d.cpp +++ b/tests/test_physics_2d.cpp @@ -386,7 +386,7 @@ public: //_add_plane(Vector2(-1,0).normalized(),-600); } - virtual bool process(float p_time) override { + virtual bool process(double p_time) override { return false; } virtual void finalize() override { diff --git a/tests/test_physics_3d.cpp b/tests/test_physics_3d.cpp index 4488e4bf64..ed49b60c71 100644 --- a/tests/test_physics_3d.cpp +++ b/tests/test_physics_3d.cpp @@ -313,7 +313,7 @@ public: test_fall(); quit = false; } - virtual bool physics_process(float p_time) override { + virtual bool physics_process(double p_time) override { if (mover.is_valid()) { static real_t joy_speed = 10; PhysicsServer3D *ps = PhysicsServer3D::get_singleton(); @@ -399,7 +399,7 @@ public: create_static_plane(Plane(Vector3(0, 1, 0), -1)); } - virtual bool process(float p_time) override { + virtual bool process(double p_time) override { return false; } diff --git a/tests/test_render.cpp b/tests/test_render.cpp index 66fd04dbdd..beff86dd83 100644 --- a/tests/test_render.cpp +++ b/tests/test_render.cpp @@ -199,7 +199,7 @@ public: ofs = 0; quit = false; } - virtual bool iteration(float p_time) { + virtual bool iteration(double p_time) { RenderingServer *vs = RenderingServer::get_singleton(); //Transform3D t; //t.rotate(Vector3(0, 1, 0), ofs); @@ -210,7 +210,7 @@ public: //return quit; - for (InstanceInfo &E : instances) { + for (const InstanceInfo &E : instances) { Transform3D pre(Basis(E.rot_axis, ofs), Vector3()); vs->instance_set_transform(E.instance, pre * E.base); /* @@ -223,7 +223,7 @@ public: return quit; } - virtual bool idle(float p_time) { + virtual bool idle(double p_time) { return quit; } |