diff --git a/src/engine/animation/animation-channel.hpp b/src/engine/animation/animation-channel.hpp index 539614d..62f0896 100644 --- a/src/engine/animation/animation-channel.hpp +++ b/src/engine/animation/animation-channel.hpp @@ -41,7 +41,7 @@ public: * * @param id ID of the channel. */ - animation_channel(int id); + explicit animation_channel(int id); /// Creates an animation channel. animation_channel(); diff --git a/src/engine/geom/convex-hull.hpp b/src/engine/geom/convex-hull.hpp index fe7ee51..5e46246 100644 --- a/src/engine/geom/convex-hull.hpp +++ b/src/engine/geom/convex-hull.hpp @@ -43,7 +43,7 @@ struct convex_hull: public bounding_volume * * @param size Number of planes the convex hull should accommodate. */ - convex_hull(std::size_t size); + explicit convex_hull(std::size_t size); /// Creates a convex hull. convex_hull(); diff --git a/src/engine/geom/plane.hpp b/src/engine/geom/plane.hpp index 95558ff..9723153 100644 --- a/src/engine/geom/plane.hpp +++ b/src/engine/geom/plane.hpp @@ -58,7 +58,7 @@ struct plane * * @param coefficients Vector containing the plane coefficients, A, B, C and D, as x, y, z, and w, respectively. */ - plane(const math::vector& coefficients); + explicit plane(const math::vector& coefficients); /// Creates an uninitialized plane. plane() = default; diff --git a/src/engine/geom/view-frustum.hpp b/src/engine/geom/view-frustum.hpp index 630e988..b9ecd9f 100644 --- a/src/engine/geom/view-frustum.hpp +++ b/src/engine/geom/view-frustum.hpp @@ -43,7 +43,7 @@ public: * * @param view_projection View-projection matrix. */ - view_frustum(const matrix_type& view_projection); + explicit view_frustum(const matrix_type& view_projection); /// Creates an uninitialized view frustum. view_frustum(); diff --git a/src/engine/gl/texture-1d.hpp b/src/engine/gl/texture-1d.hpp index b68e7c4..213899d 100644 --- a/src/engine/gl/texture-1d.hpp +++ b/src/engine/gl/texture-1d.hpp @@ -31,7 +31,7 @@ class texture_1d: public texture { public: /// @copydoc texture::texture(std::uint16_t, gl::pixel_type, gl::pixel_format, gl::color_space, const std::byte*) - texture_1d(std::uint16_t width, gl::pixel_type type = gl::pixel_type::uint_8, gl::pixel_format format = gl::pixel_format::rgba, gl::color_space color_space = gl::color_space::linear, const std::byte* data = nullptr); + explicit texture_1d(std::uint16_t width, gl::pixel_type type = gl::pixel_type::uint_8, gl::pixel_format format = gl::pixel_format::rgba, gl::color_space color_space = gl::color_space::linear, const std::byte* data = nullptr); /// Destructs a 1D texture. virtual ~texture_1d(); diff --git a/src/engine/gl/texture.hpp b/src/engine/gl/texture.hpp index 38f4bc9..67e9677 100644 --- a/src/engine/gl/texture.hpp +++ b/src/engine/gl/texture.hpp @@ -60,7 +60,7 @@ public: /// @{ texture(std::uint16_t width, std::uint16_t height, std::uint16_t depth, gl::pixel_type type = gl::pixel_type::uint_8, gl::pixel_format format = gl::pixel_format::rgba, gl::color_space color_space = gl::color_space::linear, const std::byte* data = nullptr); texture(std::uint16_t width, std::uint16_t height, gl::pixel_type type = gl::pixel_type::uint_8, gl::pixel_format format = gl::pixel_format::rgba, gl::color_space color_space = gl::color_space::linear, const std::byte* data = nullptr); - texture(std::uint16_t width, gl::pixel_type type = gl::pixel_type::uint_8, gl::pixel_format format = gl::pixel_format::rgba, gl::color_space color_space = gl::color_space::linear, const std::byte* data = nullptr); + explicit texture(std::uint16_t width, gl::pixel_type type = gl::pixel_type::uint_8, gl::pixel_format format = gl::pixel_format::rgba, gl::color_space color_space = gl::color_space::linear, const std::byte* data = nullptr); /// @} /** diff --git a/src/engine/render/material-variable.hpp b/src/engine/render/material-variable.hpp index 8777cf1..d5866a6 100644 --- a/src/engine/render/material-variable.hpp +++ b/src/engine/render/material-variable.hpp @@ -76,7 +76,7 @@ public: * @param size Number of elements in the array, or `1` if the variable is not an array. * @param value Value with which to initialize the elements. */ - inline material_variable(std::size_t size, const element_type& value = element_type()): + inline explicit material_variable(std::size_t size, const element_type& value = element_type()): elements(size, value) {} @@ -92,7 +92,7 @@ public: * * @param list List of element values. */ - inline material_variable(std::initializer_list list): + inline explicit material_variable(std::initializer_list list): elements(list) {} diff --git a/src/engine/render/material.cpp b/src/engine/render/material.cpp index 05da3e8..7c72418 100644 --- a/src/engine/render/material.cpp +++ b/src/engine/render/material.cpp @@ -239,9 +239,6 @@ static bool load_vector_property(render::material& material, hash::fnv1a32_t key // If JSON element is an array of arrays if (json.is_array() && json.begin().value().is_array()) { - // Determine size of the array - std::size_t array_size = json.size(); - // Create variable auto variable = std::make_shared>(json.size()); diff --git a/src/engine/render/passes/bloom-pass.cpp b/src/engine/render/passes/bloom-pass.cpp index 47588cc..9d3bfa0 100644 --- a/src/engine/render/passes/bloom-pass.cpp +++ b/src/engine/render/passes/bloom-pass.cpp @@ -78,7 +78,6 @@ bloom_pass::bloom_pass(gl::rasterizer* rasterizer, resource_manager* resource_ma const auto vertex_data = std::as_bytes(std::span{vertex_positions}); std::size_t vertex_size = 2; std::size_t vertex_stride = sizeof(float) * vertex_size; - std::size_t vertex_count = 6; quad_vbo = std::make_unique(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data); quad_vao = std::make_unique(); diff --git a/src/engine/render/passes/final-pass.cpp b/src/engine/render/passes/final-pass.cpp index 8eee565..b5ef9f0 100644 --- a/src/engine/render/passes/final-pass.cpp +++ b/src/engine/render/passes/final-pass.cpp @@ -63,7 +63,6 @@ final_pass::final_pass(gl::rasterizer* rasterizer, const gl::framebuffer* frameb const auto vertex_data = std::as_bytes(std::span{vertex_positions}); std::size_t vertex_size = 2; std::size_t vertex_stride = sizeof(float) * vertex_size; - std::size_t vertex_count = 6; quad_vbo = std::make_unique(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data); quad_vao = std::make_unique(); diff --git a/src/engine/render/passes/fxaa-pass.cpp b/src/engine/render/passes/fxaa-pass.cpp index 40a9eb4..8a13e7f 100644 --- a/src/engine/render/passes/fxaa-pass.cpp +++ b/src/engine/render/passes/fxaa-pass.cpp @@ -57,7 +57,6 @@ fxaa_pass::fxaa_pass(gl::rasterizer* rasterizer, const gl::framebuffer* framebuf const auto vertex_data = std::as_bytes(std::span{vertex_positions}); std::size_t vertex_size = 2; std::size_t vertex_stride = sizeof(float) * vertex_size; - std::size_t vertex_count = 6; quad_vbo = std::make_unique(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data); quad_vao = std::make_unique(); diff --git a/src/engine/render/passes/material-pass.cpp b/src/engine/render/passes/material-pass.cpp index 564c4f5..3c78b77 100644 --- a/src/engine/render/passes/material-pass.cpp +++ b/src/engine/render/passes/material-pass.cpp @@ -75,7 +75,7 @@ void material_pass::render(const render::context& ctx, render::queue& queue) auto viewport = framebuffer->get_dimensions(); rasterizer->set_viewport(0, 0, std::get<0>(viewport), std::get<1>(viewport)); - const gl::shader_program* active_shader_program = nullptr; + //const gl::shader_program* active_shader_program = nullptr; const render::material* active_material = nullptr; std::size_t active_material_hash = 0; bool active_two_sided = false; diff --git a/src/engine/render/passes/resample-pass.cpp b/src/engine/render/passes/resample-pass.cpp index edca6db..6e54410 100644 --- a/src/engine/render/passes/resample-pass.cpp +++ b/src/engine/render/passes/resample-pass.cpp @@ -57,7 +57,6 @@ resample_pass::resample_pass(gl::rasterizer* rasterizer, const gl::framebuffer* const auto vertex_data = std::as_bytes(std::span{vertex_positions}); std::size_t vertex_size = 2; std::size_t vertex_stride = sizeof(float) * vertex_size; - std::size_t vertex_count = 6; quad_vbo = std::make_unique(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data); quad_vao = std::make_unique(); diff --git a/src/engine/render/passes/sky-pass.cpp b/src/engine/render/passes/sky-pass.cpp index 1e5c7c3..25b1742 100644 --- a/src/engine/render/passes/sky-pass.cpp +++ b/src/engine/render/passes/sky-pass.cpp @@ -94,7 +94,6 @@ sky_pass::sky_pass(gl::rasterizer* rasterizer, const gl::framebuffer* framebuffe const auto vertex_data = std::as_bytes(std::span{vertex_positions}); std::size_t vertex_size = 2; std::size_t vertex_stride = sizeof(float) * vertex_size; - std::size_t vertex_count = 6; quad_vbo = std::make_unique(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data); quad_vao = std::make_unique(); diff --git a/src/engine/resources/physfs/physfs-deserialize-context.hpp b/src/engine/resources/physfs/physfs-deserialize-context.hpp index 43d86bf..167da1d 100644 --- a/src/engine/resources/physfs/physfs-deserialize-context.hpp +++ b/src/engine/resources/physfs/physfs-deserialize-context.hpp @@ -37,7 +37,7 @@ public: * * @throw deserialize_error File open error. */ - physfs_deserialize_context(const std::filesystem::path& path) noexcept(false); + explicit physfs_deserialize_context(const std::filesystem::path& path) noexcept(false); /** * Constructs a PhysicsFS deserialize context. diff --git a/src/engine/resources/physfs/physfs-serialize-context.hpp b/src/engine/resources/physfs/physfs-serialize-context.hpp index fcc5a39..b32a80b 100644 --- a/src/engine/resources/physfs/physfs-serialize-context.hpp +++ b/src/engine/resources/physfs/physfs-serialize-context.hpp @@ -37,7 +37,7 @@ public: * * @throw serialize_error File open error. */ - physfs_serialize_context(const std::filesystem::path& path) noexcept(false); + explicit physfs_serialize_context(const std::filesystem::path& path) noexcept(false); /** * Constructs a PhysicsFS serialize context. diff --git a/src/engine/scene/lod-group.hpp b/src/engine/scene/lod-group.hpp index aebc4f4..cff5f7c 100644 --- a/src/engine/scene/lod-group.hpp +++ b/src/engine/scene/lod-group.hpp @@ -39,7 +39,7 @@ public: * * @param level_count Number of detail levels in the group. */ - lod_group(std::size_t level_count); + explicit lod_group(std::size_t level_count); /// Creates a LOD group with one level of detail. lod_group(); diff --git a/src/engine/scene/text.cpp b/src/engine/scene/text.cpp index 1a5c981..0399bf4 100644 --- a/src/engine/scene/text.cpp +++ b/src/engine/scene/text.cpp @@ -73,7 +73,7 @@ text::text(): color_attribute.stride = vertex_stride; color_attribute.type = gl::vertex_attribute_type::float_32; color_attribute.components = 4; - attribute_offset += color_attribute.components * sizeof(float); + //attribute_offset += color_attribute.components * sizeof(float); // Bind vertex attributes to VAO vao->bind(render::vertex_attribute::position, position_attribute); diff --git a/src/engine/type/bitmap-font.hpp b/src/engine/type/bitmap-font.hpp index 49f4307..551b5ef 100644 --- a/src/engine/type/bitmap-font.hpp +++ b/src/engine/type/bitmap-font.hpp @@ -43,7 +43,7 @@ public: * * @param metrics Metrics describing the font. */ - bitmap_font(const font_metrics& metrics); + explicit bitmap_font(const font_metrics& metrics); /// Creates an empty bitmap font. bitmap_font(); diff --git a/src/engine/utility/hash/fnv1a.hpp b/src/engine/utility/hash/fnv1a.hpp index b2e1245..f8c17ae 100644 --- a/src/engine/utility/hash/fnv1a.hpp +++ b/src/engine/utility/hash/fnv1a.hpp @@ -124,7 +124,7 @@ struct fnv1a32_t * @param value 32-bit FNV-1a hash value. */ /// @{ - inline constexpr fnv1a32_t(value_type value) noexcept: + inline constexpr explicit(false) fnv1a32_t(value_type value) noexcept: value{value} {} fnv1a32_t() = default; @@ -136,19 +136,19 @@ struct fnv1a32_t * @param string String to hash. */ /// @{ - constexpr fnv1a32_t(const char* string) noexcept: + constexpr explicit(false) fnv1a32_t(const char* string) noexcept: value{fnv1a32({string, std::string_view(string).length()})} {} - constexpr fnv1a32_t(const wchar_t* string) noexcept: + constexpr explicit(false) fnv1a32_t(const wchar_t* string) noexcept: value{fnv1a32({string, std::wstring_view(string).length()})} {} - constexpr fnv1a32_t(const char8_t* string) noexcept: + constexpr explicit(false) fnv1a32_t(const char8_t* string) noexcept: value{fnv1a32({string, std::u8string_view(string).length()})} {} - constexpr fnv1a32_t(const char16_t* string) noexcept: + constexpr explicit(false) fnv1a32_t(const char16_t* string) noexcept: value{fnv1a32({string, std::u16string_view(string).length()})} {} - constexpr fnv1a32_t(const char32_t* string) noexcept: + constexpr explicit(false) fnv1a32_t(const char32_t* string) noexcept: value{fnv1a32({string, std::u32string_view(string).length()})} {} /// @} @@ -180,7 +180,7 @@ struct fnv1a64_t * Constructs a 64-bit FNV-1a hash value. */ /// @{ - inline constexpr fnv1a64_t(value_type value) noexcept: + inline constexpr explicit(false) fnv1a64_t(value_type value) noexcept: value{value} {} fnv1a64_t() = default; @@ -192,19 +192,19 @@ struct fnv1a64_t * @param string String to hash. */ /// @{ - constexpr fnv1a64_t(const char* string) noexcept: + constexpr explicit(false) fnv1a64_t(const char* string) noexcept: value{fnv1a64({string, std::string_view(string).length()})} {} - constexpr fnv1a64_t(const wchar_t* string) noexcept: + constexpr explicit(false) fnv1a64_t(const wchar_t* string) noexcept: value{fnv1a64({string, std::wstring_view(string).length()})} {} - constexpr fnv1a64_t(const char8_t* string) noexcept: + constexpr explicit(false) fnv1a64_t(const char8_t* string) noexcept: value{fnv1a64({string, std::u8string_view(string).length()})} {} - constexpr fnv1a64_t(const char16_t* string) noexcept: + constexpr explicit(false) fnv1a64_t(const char16_t* string) noexcept: value{fnv1a64({string, std::u16string_view(string).length()})} {} - constexpr fnv1a64_t(const char32_t* string) noexcept: + constexpr explicit(false) fnv1a64_t(const char32_t* string) noexcept: value{fnv1a64({string, std::u32string_view(string).length()})} {} /// @} diff --git a/src/game/states/collection-menu-state.hpp b/src/game/states/collection-menu-state.hpp index dafdd8b..674a48a 100644 --- a/src/game/states/collection-menu-state.hpp +++ b/src/game/states/collection-menu-state.hpp @@ -32,7 +32,7 @@ class collection_menu_state: public game_state { public: - collection_menu_state(::game& ctx); + explicit collection_menu_state(::game& ctx); virtual ~collection_menu_state(); private: diff --git a/src/game/states/controls-menu-state.hpp b/src/game/states/controls-menu-state.hpp index fc4b002..35863de 100644 --- a/src/game/states/controls-menu-state.hpp +++ b/src/game/states/controls-menu-state.hpp @@ -27,7 +27,7 @@ class controls_menu_state: public game_state { public: - controls_menu_state(::game& ctx); + explicit controls_menu_state(::game& ctx); virtual ~controls_menu_state(); private: diff --git a/src/game/states/credits-state.hpp b/src/game/states/credits-state.hpp index f7dc177..32e1914 100644 --- a/src/game/states/credits-state.hpp +++ b/src/game/states/credits-state.hpp @@ -30,7 +30,7 @@ class credits_state: public game_state { public: - credits_state(::game& ctx); + explicit credits_state(::game& ctx); virtual ~credits_state(); private: diff --git a/src/game/states/extras-menu-state.hpp b/src/game/states/extras-menu-state.hpp index 1673026..6a8042e 100644 --- a/src/game/states/extras-menu-state.hpp +++ b/src/game/states/extras-menu-state.hpp @@ -27,7 +27,7 @@ class extras_menu_state: public game_state { public: - extras_menu_state(::game& ctx); + explicit extras_menu_state(::game& ctx); virtual ~extras_menu_state(); private: diff --git a/src/game/states/game-state.hpp b/src/game/states/game-state.hpp index 7056915..05693f7 100644 --- a/src/game/states/game-state.hpp +++ b/src/game/states/game-state.hpp @@ -33,7 +33,7 @@ public: * * @param ctx Reference to the game context on which this state will operate. */ - game_state(::game& ctx); + explicit game_state(::game& ctx); /** * Destructs a game state. diff --git a/src/game/states/gamepad-config-menu-state.hpp b/src/game/states/gamepad-config-menu-state.hpp index 37e3e81..5a1c482 100644 --- a/src/game/states/gamepad-config-menu-state.hpp +++ b/src/game/states/gamepad-config-menu-state.hpp @@ -33,7 +33,7 @@ class gamepad_config_menu_state: public game_state { public: - gamepad_config_menu_state(::game& ctx); + explicit gamepad_config_menu_state(::game& ctx); virtual ~gamepad_config_menu_state(); private: diff --git a/src/game/states/graphics-menu-state.hpp b/src/game/states/graphics-menu-state.hpp index b8ee3c8..4fb0afc 100644 --- a/src/game/states/graphics-menu-state.hpp +++ b/src/game/states/graphics-menu-state.hpp @@ -27,7 +27,7 @@ class graphics_menu_state: public game_state { public: - graphics_menu_state(::game& ctx); + explicit graphics_menu_state(::game& ctx); virtual ~graphics_menu_state(); private: diff --git a/src/game/states/keyboard-config-menu-state.hpp b/src/game/states/keyboard-config-menu-state.hpp index bcc5aab..0a868a3 100644 --- a/src/game/states/keyboard-config-menu-state.hpp +++ b/src/game/states/keyboard-config-menu-state.hpp @@ -32,7 +32,7 @@ class keyboard_config_menu_state: public game_state { public: - keyboard_config_menu_state(::game& ctx); + explicit keyboard_config_menu_state(::game& ctx); virtual ~keyboard_config_menu_state(); private: diff --git a/src/game/states/language-menu-state.hpp b/src/game/states/language-menu-state.hpp index 7bda931..55a7fb0 100644 --- a/src/game/states/language-menu-state.hpp +++ b/src/game/states/language-menu-state.hpp @@ -30,7 +30,7 @@ class language_menu_state: public game_state { public: - language_menu_state(::game& ctx); + explicit language_menu_state(::game& ctx); virtual ~language_menu_state(); private: diff --git a/src/game/states/main-menu-state.hpp b/src/game/states/main-menu-state.hpp index 08f24fb..83d518d 100644 --- a/src/game/states/main-menu-state.hpp +++ b/src/game/states/main-menu-state.hpp @@ -31,7 +31,7 @@ class main_menu_state: public game_state { public: - main_menu_state(::game& ctx, bool fade_in); + explicit main_menu_state(::game& ctx, bool fade_in); virtual ~main_menu_state(); private: diff --git a/src/game/states/nest-selection-state.hpp b/src/game/states/nest-selection-state.hpp index 40f72d3..889f128 100644 --- a/src/game/states/nest-selection-state.hpp +++ b/src/game/states/nest-selection-state.hpp @@ -28,7 +28,7 @@ class nest_selection_state: public game_state { public: - nest_selection_state(::game& ctx); + explicit nest_selection_state(::game& ctx); virtual ~nest_selection_state(); private: diff --git a/src/game/states/nuptial-flight-state.hpp b/src/game/states/nuptial-flight-state.hpp index 77b0f18..070525e 100644 --- a/src/game/states/nuptial-flight-state.hpp +++ b/src/game/states/nuptial-flight-state.hpp @@ -31,7 +31,7 @@ class nuptial_flight_state: public game_state { public: - nuptial_flight_state(::game& ctx); + explicit nuptial_flight_state(::game& ctx); virtual ~nuptial_flight_state(); private: diff --git a/src/game/states/options-menu-state.hpp b/src/game/states/options-menu-state.hpp index d5c7422..db68ee2 100644 --- a/src/game/states/options-menu-state.hpp +++ b/src/game/states/options-menu-state.hpp @@ -28,7 +28,7 @@ class options_menu_state: public game_state { public: - options_menu_state(::game& ctx); + explicit options_menu_state(::game& ctx); virtual ~options_menu_state(); private: diff --git a/src/game/states/pause-menu-state.hpp b/src/game/states/pause-menu-state.hpp index 5846eb9..25b6e09 100644 --- a/src/game/states/pause-menu-state.hpp +++ b/src/game/states/pause-menu-state.hpp @@ -27,7 +27,7 @@ class pause_menu_state: public game_state { public: - pause_menu_state(::game& ctx); + explicit pause_menu_state(::game& ctx); virtual ~pause_menu_state(); private: diff --git a/src/game/states/sound-menu-state.hpp b/src/game/states/sound-menu-state.hpp index b9c851c..b0f9f5e 100644 --- a/src/game/states/sound-menu-state.hpp +++ b/src/game/states/sound-menu-state.hpp @@ -27,7 +27,7 @@ class sound_menu_state: public game_state { public: - sound_menu_state(::game& ctx); + explicit sound_menu_state(::game& ctx); virtual ~sound_menu_state(); private: diff --git a/src/game/states/splash-state.hpp b/src/game/states/splash-state.hpp index 30249df..0c4a7a4 100644 --- a/src/game/states/splash-state.hpp +++ b/src/game/states/splash-state.hpp @@ -31,7 +31,7 @@ class splash_state: public game_state { public: - splash_state(::game& ctx); + explicit splash_state(::game& ctx); virtual ~splash_state(); private: diff --git a/src/game/systems/astronomy-system.hpp b/src/game/systems/astronomy-system.hpp index 09b86c7..275c85d 100644 --- a/src/game/systems/astronomy-system.hpp +++ b/src/game/systems/astronomy-system.hpp @@ -41,7 +41,7 @@ class astronomy_system: public updatable_system { public: - astronomy_system(entity::registry& registry); + explicit astronomy_system(entity::registry& registry); ~astronomy_system(); /** diff --git a/src/game/systems/atmosphere-system.hpp b/src/game/systems/atmosphere-system.hpp index 568f041..67bdf2b 100644 --- a/src/game/systems/atmosphere-system.hpp +++ b/src/game/systems/atmosphere-system.hpp @@ -34,7 +34,7 @@ class atmosphere_system: public updatable_system { public: - atmosphere_system(entity::registry& registry); + explicit atmosphere_system(entity::registry& registry); ~atmosphere_system(); virtual void update(double t, double dt); diff --git a/src/game/systems/behavior-system.hpp b/src/game/systems/behavior-system.hpp index c93bb35..9801100 100644 --- a/src/game/systems/behavior-system.hpp +++ b/src/game/systems/behavior-system.hpp @@ -26,7 +26,7 @@ class behavior_system: public updatable_system { public: - behavior_system(entity::registry& registry); + explicit behavior_system(entity::registry& registry); virtual void update(double t, double dt); }; diff --git a/src/game/systems/blackbody-system.hpp b/src/game/systems/blackbody-system.hpp index 78c8036..692ddf0 100644 --- a/src/game/systems/blackbody-system.hpp +++ b/src/game/systems/blackbody-system.hpp @@ -35,7 +35,7 @@ class blackbody_system: public updatable_system { public: - blackbody_system(entity::registry& registry); + explicit blackbody_system(entity::registry& registry); ~blackbody_system(); virtual void update(double t, double dt); diff --git a/src/game/systems/camera-system.hpp b/src/game/systems/camera-system.hpp index 949ca11..fe9da0a 100644 --- a/src/game/systems/camera-system.hpp +++ b/src/game/systems/camera-system.hpp @@ -27,7 +27,7 @@ class camera_system: public updatable_system { public: - camera_system(entity::registry& registry); + explicit camera_system(entity::registry& registry); virtual void update(double t, double dt); void set_viewport(const float4& viewport); diff --git a/src/game/systems/collision-system.hpp b/src/game/systems/collision-system.hpp index 312ed06..f702275 100644 --- a/src/game/systems/collision-system.hpp +++ b/src/game/systems/collision-system.hpp @@ -32,7 +32,7 @@ class collision_system: public updatable_system { public: - collision_system(entity::registry& registry); + explicit collision_system(entity::registry& registry); virtual void update(double t, double dt); /** diff --git a/src/game/systems/constraint-system.hpp b/src/game/systems/constraint-system.hpp index 75e4389..1c153c2 100644 --- a/src/game/systems/constraint-system.hpp +++ b/src/game/systems/constraint-system.hpp @@ -44,7 +44,7 @@ class constraint_system: public updatable_system { public: - constraint_system(entity::registry& registry); + explicit constraint_system(entity::registry& registry); ~constraint_system(); virtual void update(double t, double dt); diff --git a/src/game/systems/locomotion-system.hpp b/src/game/systems/locomotion-system.hpp index ba120ce..dc1b87f 100644 --- a/src/game/systems/locomotion-system.hpp +++ b/src/game/systems/locomotion-system.hpp @@ -27,7 +27,7 @@ class locomotion_system: public updatable_system { public: - locomotion_system(entity::registry& registry); + explicit locomotion_system(entity::registry& registry); virtual void update(double t, double dt); }; diff --git a/src/game/systems/metamorphosis-system.hpp b/src/game/systems/metamorphosis-system.hpp index 225f1cd..4a98d2c 100644 --- a/src/game/systems/metamorphosis-system.hpp +++ b/src/game/systems/metamorphosis-system.hpp @@ -27,7 +27,7 @@ class metamorphosis_system: public updatable_system { public: - metamorphosis_system(entity::registry& registry); + explicit metamorphosis_system(entity::registry& registry); virtual void update(double t, double dt); /** diff --git a/src/game/systems/morphogenesis-system.hpp b/src/game/systems/morphogenesis-system.hpp index 4c6ec35..c270389 100644 --- a/src/game/systems/morphogenesis-system.hpp +++ b/src/game/systems/morphogenesis-system.hpp @@ -29,7 +29,7 @@ class morphogenesis_system: public updatable_system { public: - morphogenesis_system(entity::registry& registry); + explicit morphogenesis_system(entity::registry& registry); virtual void update(double t, double dt); private: diff --git a/src/game/systems/orbit-system.hpp b/src/game/systems/orbit-system.hpp index b91090a..d00fb86 100644 --- a/src/game/systems/orbit-system.hpp +++ b/src/game/systems/orbit-system.hpp @@ -34,7 +34,7 @@ class orbit_system: public updatable_system { public: - orbit_system(entity::registry& registry); + explicit orbit_system(entity::registry& registry); ~orbit_system(); /** diff --git a/src/game/systems/render-system.hpp b/src/game/systems/render-system.hpp index 8a26bbd..5d18bf3 100644 --- a/src/game/systems/render-system.hpp +++ b/src/game/systems/render-system.hpp @@ -35,7 +35,7 @@ class render_system: public updatable_system { public: - render_system(entity::registry& registry); + explicit render_system(entity::registry& registry); ~render_system(); virtual void update(double t, double dt); diff --git a/src/game/systems/spatial-system.hpp b/src/game/systems/spatial-system.hpp index 076ada7..28b54bc 100644 --- a/src/game/systems/spatial-system.hpp +++ b/src/game/systems/spatial-system.hpp @@ -28,7 +28,7 @@ class spatial_system: public updatable_system { public: - spatial_system(entity::registry& registry); + explicit spatial_system(entity::registry& registry); virtual void update(double t, double dt); private: diff --git a/src/game/systems/spring-system.hpp b/src/game/systems/spring-system.hpp index fc9ed6f..1ed099a 100644 --- a/src/game/systems/spring-system.hpp +++ b/src/game/systems/spring-system.hpp @@ -29,7 +29,7 @@ class spring_system: public updatable_system { public: - spring_system(entity::registry& registry); + explicit spring_system(entity::registry& registry); ~spring_system(); virtual void update(double t, double dt); diff --git a/src/game/systems/steering-system.hpp b/src/game/systems/steering-system.hpp index d46af1a..b4d565a 100644 --- a/src/game/systems/steering-system.hpp +++ b/src/game/systems/steering-system.hpp @@ -27,7 +27,7 @@ class steering_system: public updatable_system { public: - steering_system(entity::registry& registry); + explicit steering_system(entity::registry& registry); virtual void update(double t, double dt); }; diff --git a/src/game/systems/terrain-system.hpp b/src/game/systems/terrain-system.hpp index 521ed53..2f2534e 100644 --- a/src/game/systems/terrain-system.hpp +++ b/src/game/systems/terrain-system.hpp @@ -42,7 +42,7 @@ class terrain_system: public updatable_system { public: - terrain_system(entity::registry& registry); + explicit terrain_system(entity::registry& registry); ~terrain_system(); virtual void update(double t, double dt); diff --git a/src/game/systems/updatable-system.hpp b/src/game/systems/updatable-system.hpp index da4495d..ab8222b 100644 --- a/src/game/systems/updatable-system.hpp +++ b/src/game/systems/updatable-system.hpp @@ -34,7 +34,7 @@ public: * * @param registry Reference to the registry on which the system will operate. */ - updatable_system(entity::registry& registry); + explicit updatable_system(entity::registry& registry); /** * Perform's a system's update() function. diff --git a/src/game/world.cpp b/src/game/world.cpp index 6ec5644..f61fbb4 100644 --- a/src/game/world.cpp +++ b/src/game/world.cpp @@ -321,7 +321,7 @@ void create_stars(::game& ctx) color_attribute.stride = star_vertex_stride; color_attribute.type = gl::vertex_attribute_type::float_32; color_attribute.components = 4; - attribute_offset += color_attribute.components * sizeof(float); + //attribute_offset += color_attribute.components * sizeof(float); // Bind vertex attributes to VAO vao->bind(render::vertex_attribute::position, position_attribute);