Browse Source

Add missing explicit keyword to some classes with single argument constructors

master
C. J. Howard 1 year ago
parent
commit
329812382b
54 changed files with 60 additions and 68 deletions
  1. +1
    -1
      src/engine/animation/animation-channel.hpp
  2. +1
    -1
      src/engine/geom/convex-hull.hpp
  3. +1
    -1
      src/engine/geom/plane.hpp
  4. +1
    -1
      src/engine/geom/view-frustum.hpp
  5. +1
    -1
      src/engine/gl/texture-1d.hpp
  6. +1
    -1
      src/engine/gl/texture.hpp
  7. +2
    -2
      src/engine/render/material-variable.hpp
  8. +0
    -3
      src/engine/render/material.cpp
  9. +0
    -1
      src/engine/render/passes/bloom-pass.cpp
  10. +0
    -1
      src/engine/render/passes/final-pass.cpp
  11. +0
    -1
      src/engine/render/passes/fxaa-pass.cpp
  12. +1
    -1
      src/engine/render/passes/material-pass.cpp
  13. +0
    -1
      src/engine/render/passes/resample-pass.cpp
  14. +0
    -1
      src/engine/render/passes/sky-pass.cpp
  15. +1
    -1
      src/engine/resources/physfs/physfs-deserialize-context.hpp
  16. +1
    -1
      src/engine/resources/physfs/physfs-serialize-context.hpp
  17. +1
    -1
      src/engine/scene/lod-group.hpp
  18. +1
    -1
      src/engine/scene/text.cpp
  19. +1
    -1
      src/engine/type/bitmap-font.hpp
  20. +12
    -12
      src/engine/utility/hash/fnv1a.hpp
  21. +1
    -1
      src/game/states/collection-menu-state.hpp
  22. +1
    -1
      src/game/states/controls-menu-state.hpp
  23. +1
    -1
      src/game/states/credits-state.hpp
  24. +1
    -1
      src/game/states/extras-menu-state.hpp
  25. +1
    -1
      src/game/states/game-state.hpp
  26. +1
    -1
      src/game/states/gamepad-config-menu-state.hpp
  27. +1
    -1
      src/game/states/graphics-menu-state.hpp
  28. +1
    -1
      src/game/states/keyboard-config-menu-state.hpp
  29. +1
    -1
      src/game/states/language-menu-state.hpp
  30. +1
    -1
      src/game/states/main-menu-state.hpp
  31. +1
    -1
      src/game/states/nest-selection-state.hpp
  32. +1
    -1
      src/game/states/nuptial-flight-state.hpp
  33. +1
    -1
      src/game/states/options-menu-state.hpp
  34. +1
    -1
      src/game/states/pause-menu-state.hpp
  35. +1
    -1
      src/game/states/sound-menu-state.hpp
  36. +1
    -1
      src/game/states/splash-state.hpp
  37. +1
    -1
      src/game/systems/astronomy-system.hpp
  38. +1
    -1
      src/game/systems/atmosphere-system.hpp
  39. +1
    -1
      src/game/systems/behavior-system.hpp
  40. +1
    -1
      src/game/systems/blackbody-system.hpp
  41. +1
    -1
      src/game/systems/camera-system.hpp
  42. +1
    -1
      src/game/systems/collision-system.hpp
  43. +1
    -1
      src/game/systems/constraint-system.hpp
  44. +1
    -1
      src/game/systems/locomotion-system.hpp
  45. +1
    -1
      src/game/systems/metamorphosis-system.hpp
  46. +1
    -1
      src/game/systems/morphogenesis-system.hpp
  47. +1
    -1
      src/game/systems/orbit-system.hpp
  48. +1
    -1
      src/game/systems/render-system.hpp
  49. +1
    -1
      src/game/systems/spatial-system.hpp
  50. +1
    -1
      src/game/systems/spring-system.hpp
  51. +1
    -1
      src/game/systems/steering-system.hpp
  52. +1
    -1
      src/game/systems/terrain-system.hpp
  53. +1
    -1
      src/game/systems/updatable-system.hpp
  54. +1
    -1
      src/game/world.cpp

+ 1
- 1
src/engine/animation/animation-channel.hpp View File

@ -41,7 +41,7 @@ public:
* *
* @param id ID of the channel. * @param id ID of the channel.
*/ */
animation_channel(int id);
explicit animation_channel(int id);
/// Creates an animation channel. /// Creates an animation channel.
animation_channel(); animation_channel();

+ 1
- 1
src/engine/geom/convex-hull.hpp View File

@ -43,7 +43,7 @@ struct convex_hull: public bounding_volume
* *
* @param size Number of planes the convex hull should accommodate. * @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. /// Creates a convex hull.
convex_hull(); convex_hull();

+ 1
- 1
src/engine/geom/plane.hpp View File

@ -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. * @param coefficients Vector containing the plane coefficients, A, B, C and D, as x, y, z, and w, respectively.
*/ */
plane(const math::vector<T, 4>& coefficients);
explicit plane(const math::vector<T, 4>& coefficients);
/// Creates an uninitialized plane. /// Creates an uninitialized plane.
plane() = default; plane() = default;

+ 1
- 1
src/engine/geom/view-frustum.hpp View File

@ -43,7 +43,7 @@ public:
* *
* @param view_projection View-projection matrix. * @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. /// Creates an uninitialized view frustum.
view_frustum(); view_frustum();

+ 1
- 1
src/engine/gl/texture-1d.hpp View File

@ -31,7 +31,7 @@ class texture_1d: public texture
{ {
public: public:
/// @copydoc texture::texture(std::uint16_t, gl::pixel_type, gl::pixel_format, gl::color_space, const std::byte*) /// @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. /// Destructs a 1D texture.
virtual ~texture_1d(); virtual ~texture_1d();

+ 1
- 1
src/engine/gl/texture.hpp View File

@ -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, 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, 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);
/// @} /// @}
/** /**

+ 2
- 2
src/engine/render/material-variable.hpp View File

@ -76,7 +76,7 @@ public:
* @param size Number of elements in the array, or `1` if the variable is not an array. * @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. * @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) elements(size, value)
{} {}
@ -92,7 +92,7 @@ public:
* *
* @param list List of element values. * @param list List of element values.
*/ */
inline material_variable(std::initializer_list<element_type> list):
inline explicit material_variable(std::initializer_list<element_type> list):
elements(list) elements(list)
{} {}

+ 0
- 3
src/engine/render/material.cpp View File

@ -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 element is an array of arrays
if (json.is_array() && json.begin().value().is_array()) if (json.is_array() && json.begin().value().is_array())
{ {
// Determine size of the array
std::size_t array_size = json.size();
// Create variable // Create variable
auto variable = std::make_shared<render::material_variable<T>>(json.size()); auto variable = std::make_shared<render::material_variable<T>>(json.size());

+ 0
- 1
src/engine/render/passes/bloom-pass.cpp View File

@ -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}); const auto vertex_data = std::as_bytes(std::span{vertex_positions});
std::size_t vertex_size = 2; std::size_t vertex_size = 2;
std::size_t vertex_stride = sizeof(float) * vertex_size; std::size_t vertex_stride = sizeof(float) * vertex_size;
std::size_t vertex_count = 6;
quad_vbo = std::make_unique<gl::vertex_buffer>(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data); quad_vbo = std::make_unique<gl::vertex_buffer>(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data);
quad_vao = std::make_unique<gl::vertex_array>(); quad_vao = std::make_unique<gl::vertex_array>();

+ 0
- 1
src/engine/render/passes/final-pass.cpp View File

@ -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}); const auto vertex_data = std::as_bytes(std::span{vertex_positions});
std::size_t vertex_size = 2; std::size_t vertex_size = 2;
std::size_t vertex_stride = sizeof(float) * vertex_size; std::size_t vertex_stride = sizeof(float) * vertex_size;
std::size_t vertex_count = 6;
quad_vbo = std::make_unique<gl::vertex_buffer>(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data); quad_vbo = std::make_unique<gl::vertex_buffer>(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data);
quad_vao = std::make_unique<gl::vertex_array>(); quad_vao = std::make_unique<gl::vertex_array>();

+ 0
- 1
src/engine/render/passes/fxaa-pass.cpp View File

@ -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}); const auto vertex_data = std::as_bytes(std::span{vertex_positions});
std::size_t vertex_size = 2; std::size_t vertex_size = 2;
std::size_t vertex_stride = sizeof(float) * vertex_size; std::size_t vertex_stride = sizeof(float) * vertex_size;
std::size_t vertex_count = 6;
quad_vbo = std::make_unique<gl::vertex_buffer>(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data); quad_vbo = std::make_unique<gl::vertex_buffer>(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data);
quad_vao = std::make_unique<gl::vertex_array>(); quad_vao = std::make_unique<gl::vertex_array>();

+ 1
- 1
src/engine/render/passes/material-pass.cpp View File

@ -75,7 +75,7 @@ void material_pass::render(const render::context& ctx, render::queue& queue)
auto viewport = framebuffer->get_dimensions(); auto viewport = framebuffer->get_dimensions();
rasterizer->set_viewport(0, 0, std::get<0>(viewport), std::get<1>(viewport)); 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; const render::material* active_material = nullptr;
std::size_t active_material_hash = 0; std::size_t active_material_hash = 0;
bool active_two_sided = false; bool active_two_sided = false;

+ 0
- 1
src/engine/render/passes/resample-pass.cpp View File

@ -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}); const auto vertex_data = std::as_bytes(std::span{vertex_positions});
std::size_t vertex_size = 2; std::size_t vertex_size = 2;
std::size_t vertex_stride = sizeof(float) * vertex_size; std::size_t vertex_stride = sizeof(float) * vertex_size;
std::size_t vertex_count = 6;
quad_vbo = std::make_unique<gl::vertex_buffer>(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data); quad_vbo = std::make_unique<gl::vertex_buffer>(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data);
quad_vao = std::make_unique<gl::vertex_array>(); quad_vao = std::make_unique<gl::vertex_array>();

+ 0
- 1
src/engine/render/passes/sky-pass.cpp View File

@ -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}); const auto vertex_data = std::as_bytes(std::span{vertex_positions});
std::size_t vertex_size = 2; std::size_t vertex_size = 2;
std::size_t vertex_stride = sizeof(float) * vertex_size; std::size_t vertex_stride = sizeof(float) * vertex_size;
std::size_t vertex_count = 6;
quad_vbo = std::make_unique<gl::vertex_buffer>(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data); quad_vbo = std::make_unique<gl::vertex_buffer>(gl::buffer_usage::static_draw, vertex_data.size(), vertex_data);
quad_vao = std::make_unique<gl::vertex_array>(); quad_vao = std::make_unique<gl::vertex_array>();

+ 1
- 1
src/engine/resources/physfs/physfs-deserialize-context.hpp View File

@ -37,7 +37,7 @@ public:
* *
* @throw deserialize_error File open error. * @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. * Constructs a PhysicsFS deserialize context.

+ 1
- 1
src/engine/resources/physfs/physfs-serialize-context.hpp View File

@ -37,7 +37,7 @@ public:
* *
* @throw serialize_error File open error. * @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. * Constructs a PhysicsFS serialize context.

+ 1
- 1
src/engine/scene/lod-group.hpp View File

@ -39,7 +39,7 @@ public:
* *
* @param level_count Number of detail levels in the group. * @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. /// Creates a LOD group with one level of detail.
lod_group(); lod_group();

+ 1
- 1
src/engine/scene/text.cpp View File

@ -73,7 +73,7 @@ text::text():
color_attribute.stride = vertex_stride; color_attribute.stride = vertex_stride;
color_attribute.type = gl::vertex_attribute_type::float_32; color_attribute.type = gl::vertex_attribute_type::float_32;
color_attribute.components = 4; color_attribute.components = 4;
attribute_offset += color_attribute.components * sizeof(float);
//attribute_offset += color_attribute.components * sizeof(float);
// Bind vertex attributes to VAO // Bind vertex attributes to VAO
vao->bind(render::vertex_attribute::position, position_attribute); vao->bind(render::vertex_attribute::position, position_attribute);

+ 1
- 1
src/engine/type/bitmap-font.hpp View File

@ -43,7 +43,7 @@ public:
* *
* @param metrics Metrics describing the font. * @param metrics Metrics describing the font.
*/ */
bitmap_font(const font_metrics& metrics);
explicit bitmap_font(const font_metrics& metrics);
/// Creates an empty bitmap font. /// Creates an empty bitmap font.
bitmap_font(); bitmap_font();

+ 12
- 12
src/engine/utility/hash/fnv1a.hpp View File

@ -124,7 +124,7 @@ struct fnv1a32_t
* @param value 32-bit FNV-1a hash value. * @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} value{value}
{} {}
fnv1a32_t() = default; fnv1a32_t() = default;
@ -136,19 +136,19 @@ struct fnv1a32_t
* @param string String to hash. * @param string String to hash.
*/ */
/// @{ /// @{
constexpr fnv1a32_t(const char* string) noexcept:
constexpr explicit(false) fnv1a32_t(const char* string) noexcept:
value{fnv1a32<char>({string, std::string_view(string).length()})} value{fnv1a32<char>({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<wchar_t>({string, std::wstring_view(string).length()})} value{fnv1a32<wchar_t>({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<char8_t>({string, std::u8string_view(string).length()})} value{fnv1a32<char8_t>({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<char16_t>({string, std::u16string_view(string).length()})} value{fnv1a32<char16_t>({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<char32_t>({string, std::u32string_view(string).length()})} value{fnv1a32<char32_t>({string, std::u32string_view(string).length()})}
{} {}
/// @} /// @}
@ -180,7 +180,7 @@ struct fnv1a64_t
* Constructs a 64-bit FNV-1a hash value. * 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} value{value}
{} {}
fnv1a64_t() = default; fnv1a64_t() = default;
@ -192,19 +192,19 @@ struct fnv1a64_t
* @param string String to hash. * @param string String to hash.
*/ */
/// @{ /// @{
constexpr fnv1a64_t(const char* string) noexcept:
constexpr explicit(false) fnv1a64_t(const char* string) noexcept:
value{fnv1a64<char>({string, std::string_view(string).length()})} value{fnv1a64<char>({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<wchar_t>({string, std::wstring_view(string).length()})} value{fnv1a64<wchar_t>({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<char8_t>({string, std::u8string_view(string).length()})} value{fnv1a64<char8_t>({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<char16_t>({string, std::u16string_view(string).length()})} value{fnv1a64<char16_t>({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<char32_t>({string, std::u32string_view(string).length()})} value{fnv1a64<char32_t>({string, std::u32string_view(string).length()})}
{} {}
/// @} /// @}

+ 1
- 1
src/game/states/collection-menu-state.hpp View File

@ -32,7 +32,7 @@
class collection_menu_state: public game_state class collection_menu_state: public game_state
{ {
public: public:
collection_menu_state(::game& ctx);
explicit collection_menu_state(::game& ctx);
virtual ~collection_menu_state(); virtual ~collection_menu_state();
private: private:

+ 1
- 1
src/game/states/controls-menu-state.hpp View File

@ -27,7 +27,7 @@
class controls_menu_state: public game_state class controls_menu_state: public game_state
{ {
public: public:
controls_menu_state(::game& ctx);
explicit controls_menu_state(::game& ctx);
virtual ~controls_menu_state(); virtual ~controls_menu_state();
private: private:

+ 1
- 1
src/game/states/credits-state.hpp View File

@ -30,7 +30,7 @@
class credits_state: public game_state class credits_state: public game_state
{ {
public: public:
credits_state(::game& ctx);
explicit credits_state(::game& ctx);
virtual ~credits_state(); virtual ~credits_state();
private: private:

+ 1
- 1
src/game/states/extras-menu-state.hpp View File

@ -27,7 +27,7 @@
class extras_menu_state: public game_state class extras_menu_state: public game_state
{ {
public: public:
extras_menu_state(::game& ctx);
explicit extras_menu_state(::game& ctx);
virtual ~extras_menu_state(); virtual ~extras_menu_state();
private: private:

+ 1
- 1
src/game/states/game-state.hpp View File

@ -33,7 +33,7 @@ public:
* *
* @param ctx Reference to the game context on which this state will operate. * @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. * Destructs a game state.

+ 1
- 1
src/game/states/gamepad-config-menu-state.hpp View File

@ -33,7 +33,7 @@
class gamepad_config_menu_state: public game_state class gamepad_config_menu_state: public game_state
{ {
public: public:
gamepad_config_menu_state(::game& ctx);
explicit gamepad_config_menu_state(::game& ctx);
virtual ~gamepad_config_menu_state(); virtual ~gamepad_config_menu_state();
private: private:

+ 1
- 1
src/game/states/graphics-menu-state.hpp View File

@ -27,7 +27,7 @@
class graphics_menu_state: public game_state class graphics_menu_state: public game_state
{ {
public: public:
graphics_menu_state(::game& ctx);
explicit graphics_menu_state(::game& ctx);
virtual ~graphics_menu_state(); virtual ~graphics_menu_state();
private: private:

+ 1
- 1
src/game/states/keyboard-config-menu-state.hpp View File

@ -32,7 +32,7 @@
class keyboard_config_menu_state: public game_state class keyboard_config_menu_state: public game_state
{ {
public: public:
keyboard_config_menu_state(::game& ctx);
explicit keyboard_config_menu_state(::game& ctx);
virtual ~keyboard_config_menu_state(); virtual ~keyboard_config_menu_state();
private: private:

+ 1
- 1
src/game/states/language-menu-state.hpp View File

@ -30,7 +30,7 @@
class language_menu_state: public game_state class language_menu_state: public game_state
{ {
public: public:
language_menu_state(::game& ctx);
explicit language_menu_state(::game& ctx);
virtual ~language_menu_state(); virtual ~language_menu_state();
private: private:

+ 1
- 1
src/game/states/main-menu-state.hpp View File

@ -31,7 +31,7 @@
class main_menu_state: public game_state class main_menu_state: public game_state
{ {
public: public:
main_menu_state(::game& ctx, bool fade_in);
explicit main_menu_state(::game& ctx, bool fade_in);
virtual ~main_menu_state(); virtual ~main_menu_state();
private: private:

+ 1
- 1
src/game/states/nest-selection-state.hpp View File

@ -28,7 +28,7 @@
class nest_selection_state: public game_state class nest_selection_state: public game_state
{ {
public: public:
nest_selection_state(::game& ctx);
explicit nest_selection_state(::game& ctx);
virtual ~nest_selection_state(); virtual ~nest_selection_state();
private: private:

+ 1
- 1
src/game/states/nuptial-flight-state.hpp View File

@ -31,7 +31,7 @@
class nuptial_flight_state: public game_state class nuptial_flight_state: public game_state
{ {
public: public:
nuptial_flight_state(::game& ctx);
explicit nuptial_flight_state(::game& ctx);
virtual ~nuptial_flight_state(); virtual ~nuptial_flight_state();
private: private:

+ 1
- 1
src/game/states/options-menu-state.hpp View File

@ -28,7 +28,7 @@
class options_menu_state: public game_state class options_menu_state: public game_state
{ {
public: public:
options_menu_state(::game& ctx);
explicit options_menu_state(::game& ctx);
virtual ~options_menu_state(); virtual ~options_menu_state();
private: private:

+ 1
- 1
src/game/states/pause-menu-state.hpp View File

@ -27,7 +27,7 @@
class pause_menu_state: public game_state class pause_menu_state: public game_state
{ {
public: public:
pause_menu_state(::game& ctx);
explicit pause_menu_state(::game& ctx);
virtual ~pause_menu_state(); virtual ~pause_menu_state();
private: private:

+ 1
- 1
src/game/states/sound-menu-state.hpp View File

@ -27,7 +27,7 @@
class sound_menu_state: public game_state class sound_menu_state: public game_state
{ {
public: public:
sound_menu_state(::game& ctx);
explicit sound_menu_state(::game& ctx);
virtual ~sound_menu_state(); virtual ~sound_menu_state();
private: private:

+ 1
- 1
src/game/states/splash-state.hpp View File

@ -31,7 +31,7 @@
class splash_state: public game_state class splash_state: public game_state
{ {
public: public:
splash_state(::game& ctx);
explicit splash_state(::game& ctx);
virtual ~splash_state(); virtual ~splash_state();
private: private:

+ 1
- 1
src/game/systems/astronomy-system.hpp View File

@ -41,7 +41,7 @@ class astronomy_system:
public updatable_system public updatable_system
{ {
public: public:
astronomy_system(entity::registry& registry);
explicit astronomy_system(entity::registry& registry);
~astronomy_system(); ~astronomy_system();
/** /**

+ 1
- 1
src/game/systems/atmosphere-system.hpp View File

@ -34,7 +34,7 @@ class atmosphere_system:
public updatable_system public updatable_system
{ {
public: public:
atmosphere_system(entity::registry& registry);
explicit atmosphere_system(entity::registry& registry);
~atmosphere_system(); ~atmosphere_system();
virtual void update(double t, double dt); virtual void update(double t, double dt);

+ 1
- 1
src/game/systems/behavior-system.hpp View File

@ -26,7 +26,7 @@ class behavior_system:
public updatable_system public updatable_system
{ {
public: public:
behavior_system(entity::registry& registry);
explicit behavior_system(entity::registry& registry);
virtual void update(double t, double dt); virtual void update(double t, double dt);
}; };

+ 1
- 1
src/game/systems/blackbody-system.hpp View File

@ -35,7 +35,7 @@ class blackbody_system:
public updatable_system public updatable_system
{ {
public: public:
blackbody_system(entity::registry& registry);
explicit blackbody_system(entity::registry& registry);
~blackbody_system(); ~blackbody_system();
virtual void update(double t, double dt); virtual void update(double t, double dt);

+ 1
- 1
src/game/systems/camera-system.hpp View File

@ -27,7 +27,7 @@
class camera_system: public updatable_system class camera_system: public updatable_system
{ {
public: public:
camera_system(entity::registry& registry);
explicit camera_system(entity::registry& registry);
virtual void update(double t, double dt); virtual void update(double t, double dt);
void set_viewport(const float4& viewport); void set_viewport(const float4& viewport);

+ 1
- 1
src/game/systems/collision-system.hpp View File

@ -32,7 +32,7 @@
class collision_system: public updatable_system class collision_system: public updatable_system
{ {
public: public:
collision_system(entity::registry& registry);
explicit collision_system(entity::registry& registry);
virtual void update(double t, double dt); virtual void update(double t, double dt);
/** /**

+ 1
- 1
src/game/systems/constraint-system.hpp View File

@ -44,7 +44,7 @@ class constraint_system:
public updatable_system public updatable_system
{ {
public: public:
constraint_system(entity::registry& registry);
explicit constraint_system(entity::registry& registry);
~constraint_system(); ~constraint_system();
virtual void update(double t, double dt); virtual void update(double t, double dt);

+ 1
- 1
src/game/systems/locomotion-system.hpp View File

@ -27,7 +27,7 @@ class locomotion_system:
public updatable_system public updatable_system
{ {
public: public:
locomotion_system(entity::registry& registry);
explicit locomotion_system(entity::registry& registry);
virtual void update(double t, double dt); virtual void update(double t, double dt);
}; };

+ 1
- 1
src/game/systems/metamorphosis-system.hpp View File

@ -27,7 +27,7 @@ class metamorphosis_system:
public updatable_system public updatable_system
{ {
public: public:
metamorphosis_system(entity::registry& registry);
explicit metamorphosis_system(entity::registry& registry);
virtual void update(double t, double dt); virtual void update(double t, double dt);
/** /**

+ 1
- 1
src/game/systems/morphogenesis-system.hpp View File

@ -29,7 +29,7 @@ class morphogenesis_system:
public updatable_system public updatable_system
{ {
public: public:
morphogenesis_system(entity::registry& registry);
explicit morphogenesis_system(entity::registry& registry);
virtual void update(double t, double dt); virtual void update(double t, double dt);
private: private:

+ 1
- 1
src/game/systems/orbit-system.hpp View File

@ -34,7 +34,7 @@ class orbit_system:
public updatable_system public updatable_system
{ {
public: public:
orbit_system(entity::registry& registry);
explicit orbit_system(entity::registry& registry);
~orbit_system(); ~orbit_system();
/** /**

+ 1
- 1
src/game/systems/render-system.hpp View File

@ -35,7 +35,7 @@
class render_system: public updatable_system class render_system: public updatable_system
{ {
public: public:
render_system(entity::registry& registry);
explicit render_system(entity::registry& registry);
~render_system(); ~render_system();
virtual void update(double t, double dt); virtual void update(double t, double dt);

+ 1
- 1
src/game/systems/spatial-system.hpp View File

@ -28,7 +28,7 @@ class spatial_system:
public updatable_system public updatable_system
{ {
public: public:
spatial_system(entity::registry& registry);
explicit spatial_system(entity::registry& registry);
virtual void update(double t, double dt); virtual void update(double t, double dt);
private: private:

+ 1
- 1
src/game/systems/spring-system.hpp View File

@ -29,7 +29,7 @@ class spring_system:
public updatable_system public updatable_system
{ {
public: public:
spring_system(entity::registry& registry);
explicit spring_system(entity::registry& registry);
~spring_system(); ~spring_system();
virtual void update(double t, double dt); virtual void update(double t, double dt);

+ 1
- 1
src/game/systems/steering-system.hpp View File

@ -27,7 +27,7 @@ class steering_system:
public updatable_system public updatable_system
{ {
public: public:
steering_system(entity::registry& registry);
explicit steering_system(entity::registry& registry);
virtual void update(double t, double dt); virtual void update(double t, double dt);
}; };

+ 1
- 1
src/game/systems/terrain-system.hpp View File

@ -42,7 +42,7 @@
class terrain_system: public updatable_system class terrain_system: public updatable_system
{ {
public: public:
terrain_system(entity::registry& registry);
explicit terrain_system(entity::registry& registry);
~terrain_system(); ~terrain_system();
virtual void update(double t, double dt); virtual void update(double t, double dt);

+ 1
- 1
src/game/systems/updatable-system.hpp View File

@ -34,7 +34,7 @@ public:
* *
* @param registry Reference to the registry on which the system will operate. * @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. * Perform's a system's update() function.

+ 1
- 1
src/game/world.cpp View File

@ -321,7 +321,7 @@ void create_stars(::game& ctx)
color_attribute.stride = star_vertex_stride; color_attribute.stride = star_vertex_stride;
color_attribute.type = gl::vertex_attribute_type::float_32; color_attribute.type = gl::vertex_attribute_type::float_32;
color_attribute.components = 4; color_attribute.components = 4;
attribute_offset += color_attribute.components * sizeof(float);
//attribute_offset += color_attribute.components * sizeof(float);
// Bind vertex attributes to VAO // Bind vertex attributes to VAO
vao->bind(render::vertex_attribute::position, position_attribute); vao->bind(render::vertex_attribute::position, position_attribute);

Loading…
Cancel
Save