diff --git a/headers/enduro2d/core/deferrer.hpp b/headers/enduro2d/core/deferrer.hpp index 1d543798..f7489d62 100644 --- a/headers/enduro2d/core/deferrer.hpp +++ b/headers/enduro2d/core/deferrer.hpp @@ -13,7 +13,7 @@ namespace e2d class deferrer final : public module { public: deferrer(); - ~deferrer() noexcept final; + ~deferrer() noexcept final = default; stdex::jobber& worker() noexcept; const stdex::jobber& worker() const noexcept; diff --git a/headers/enduro2d/high/address.hpp b/headers/enduro2d/high/address.hpp index 45a70644..b11ee1b8 100644 --- a/headers/enduro2d/high/address.hpp +++ b/headers/enduro2d/high/address.hpp @@ -8,8 +8,8 @@ #include "_high.hpp" -namespace e2d { namespace address +namespace e2d::address { str parent(str_view address); str nested(str_view address); -}} +} diff --git a/headers/enduro2d/high/asset.hpp b/headers/enduro2d/high/asset.hpp index cc8bdd8d..37f43510 100644 --- a/headers/enduro2d/high/asset.hpp +++ b/headers/enduro2d/high/asset.hpp @@ -4,8 +4,6 @@ * Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com) ******************************************************************************/ -#ifndef E2D_INCLUDE_GUARD_1122A7CA62954AEF9E0A787064D28F73 -#define E2D_INCLUDE_GUARD_1122A7CA62954AEF9E0A787064D28F73 #pragma once #include "_high.hpp" @@ -133,4 +131,3 @@ namespace e2d } #include "asset.inl" -#endif diff --git a/headers/enduro2d/high/asset.inl b/headers/enduro2d/high/asset.inl index 0a52d10c..7424551b 100644 --- a/headers/enduro2d/high/asset.inl +++ b/headers/enduro2d/high/asset.inl @@ -4,11 +4,10 @@ * Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com) ******************************************************************************/ -#ifndef E2D_INCLUDE_GUARD_6FD0B1DD12004CF78E7AC5FBBC36E854 -#define E2D_INCLUDE_GUARD_6FD0B1DD12004CF78E7AC5FBBC36E854 #pragma once #include "_high.hpp" + #include "asset.hpp" namespace e2d @@ -167,5 +166,3 @@ namespace e2d }); } } - -#endif diff --git a/headers/enduro2d/high/atlas.hpp b/headers/enduro2d/high/atlas.hpp index 4ed2f4ad..54f7979b 100644 --- a/headers/enduro2d/high/atlas.hpp +++ b/headers/enduro2d/high/atlas.hpp @@ -14,8 +14,8 @@ namespace e2d { class atlas final { public: - atlas(); - ~atlas() noexcept; + atlas() = default; + ~atlas() noexcept = default; atlas(atlas&& other) noexcept; atlas& operator=(atlas&& other) noexcept; diff --git a/headers/enduro2d/high/factory.hpp b/headers/enduro2d/high/factory.hpp index a634dc53..5cffbfaf 100644 --- a/headers/enduro2d/high/factory.hpp +++ b/headers/enduro2d/high/factory.hpp @@ -4,8 +4,6 @@ * Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com) ******************************************************************************/ -#ifndef E2D_INCLUDE_GUARD_9C9B1BA27AAC42CBAA07890458076B81 -#define E2D_INCLUDE_GUARD_9C9B1BA27AAC42CBAA07890458076B81 #pragma once #include "_high.hpp" @@ -140,4 +138,3 @@ namespace e2d } #include "factory.inl" -#endif diff --git a/headers/enduro2d/high/factory.inl b/headers/enduro2d/high/factory.inl index 6decca06..e3cc72c0 100644 --- a/headers/enduro2d/high/factory.inl +++ b/headers/enduro2d/high/factory.inl @@ -4,11 +4,10 @@ * Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com) ******************************************************************************/ -#ifndef E2D_INCLUDE_GUARD_6CDF0C8E49C9459EB7762C8AF7F7ED85 -#define E2D_INCLUDE_GUARD_6CDF0C8E49C9459EB7762C8AF7F7ED85 #pragma once #include "_high.hpp" + #include "factory.hpp" namespace e2d @@ -88,4 +87,3 @@ namespace e2d return *this; } } -#endif diff --git a/headers/enduro2d/high/flipbook.hpp b/headers/enduro2d/high/flipbook.hpp index 010845af..2af1dd19 100644 --- a/headers/enduro2d/high/flipbook.hpp +++ b/headers/enduro2d/high/flipbook.hpp @@ -24,8 +24,8 @@ namespace e2d vector frames; }; public: - flipbook(); - ~flipbook() noexcept; + flipbook() = default; + ~flipbook() noexcept = default; flipbook(flipbook&& other) noexcept; flipbook& operator=(flipbook&& other) noexcept; diff --git a/headers/enduro2d/high/library.hpp b/headers/enduro2d/high/library.hpp index 99cb0655..03ed4235 100644 --- a/headers/enduro2d/high/library.hpp +++ b/headers/enduro2d/high/library.hpp @@ -4,8 +4,6 @@ * Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com) ******************************************************************************/ -#ifndef E2D_INCLUDE_GUARD_C3A242D805B8481AB9F778BA8F272D72 -#define E2D_INCLUDE_GUARD_C3A242D805B8481AB9F778BA8F272D72 #pragma once #include "_high.hpp" @@ -185,4 +183,3 @@ namespace e2d } #include "library.inl" -#endif diff --git a/headers/enduro2d/high/library.inl b/headers/enduro2d/high/library.inl index b8cd13e8..cb365dd9 100644 --- a/headers/enduro2d/high/library.inl +++ b/headers/enduro2d/high/library.inl @@ -4,11 +4,10 @@ * Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com) ******************************************************************************/ -#ifndef E2D_INCLUDE_GUARD_C9B4A08B2E2A4A659AB390BDC6EBEFE8 -#define E2D_INCLUDE_GUARD_C9B4A08B2E2A4A659AB390BDC6EBEFE8 #pragma once #include "_high.hpp" + #include "library.hpp" namespace e2d @@ -312,5 +311,3 @@ namespace e2d }); } } - -#endif diff --git a/headers/enduro2d/high/model.hpp b/headers/enduro2d/high/model.hpp index e24bccea..7b4b2ece 100644 --- a/headers/enduro2d/high/model.hpp +++ b/headers/enduro2d/high/model.hpp @@ -14,8 +14,8 @@ namespace e2d { class model final { public: - model(); - ~model() noexcept; + model() = default; + ~model() noexcept = default; model(model&& other) noexcept; model& operator=(model&& other) noexcept; diff --git a/headers/enduro2d/high/node.hpp b/headers/enduro2d/high/node.hpp index 194f6591..a1e5f62f 100644 --- a/headers/enduro2d/high/node.hpp +++ b/headers/enduro2d/high/node.hpp @@ -4,8 +4,6 @@ * Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com) ******************************************************************************/ -#ifndef E2D_INCLUDE_GUARD_8703CE4A74D94C3CA27ED91AFF906936 -#define E2D_INCLUDE_GUARD_8703CE4A74D94C3CA27ED91AFF906936 #pragma once #include "_high.hpp" @@ -157,4 +155,3 @@ namespace e2d } #include "node.inl" -#endif diff --git a/headers/enduro2d/high/node.inl b/headers/enduro2d/high/node.inl index bdae057b..06895416 100644 --- a/headers/enduro2d/high/node.inl +++ b/headers/enduro2d/high/node.inl @@ -4,8 +4,6 @@ * Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com) ******************************************************************************/ -#ifndef E2D_INCLUDE_GUARD_27EFFE66AA124FFB862BE95C2FF38017 -#define E2D_INCLUDE_GUARD_27EFFE66AA124FFB862BE95C2FF38017 #pragma once #include "node.hpp" @@ -46,5 +44,3 @@ namespace e2d return count; } } - -#endif diff --git a/headers/enduro2d/high/prefab.hpp b/headers/enduro2d/high/prefab.hpp index caa96017..7178450a 100644 --- a/headers/enduro2d/high/prefab.hpp +++ b/headers/enduro2d/high/prefab.hpp @@ -12,8 +12,8 @@ namespace e2d { class prefab final { public: - prefab(); - ~prefab() noexcept; + prefab() = default; + ~prefab() noexcept = default; prefab(prefab&& other) noexcept; prefab& operator=(prefab&& other) noexcept; diff --git a/headers/enduro2d/high/sprite.hpp b/headers/enduro2d/high/sprite.hpp index 5623d12f..0528ff74 100644 --- a/headers/enduro2d/high/sprite.hpp +++ b/headers/enduro2d/high/sprite.hpp @@ -14,8 +14,8 @@ namespace e2d { class sprite final { public: - sprite(); - ~sprite() noexcept; + sprite() = default; + ~sprite() noexcept = default; sprite(sprite&& other) noexcept; sprite& operator=(sprite&& other) noexcept; diff --git a/sources/enduro2d/core/deferrer.cpp b/sources/enduro2d/core/deferrer.cpp index c8507893..68251529 100644 --- a/sources/enduro2d/core/deferrer.cpp +++ b/sources/enduro2d/core/deferrer.cpp @@ -11,8 +11,6 @@ namespace e2d deferrer::deferrer() : worker_(math::max(2u, std::thread::hardware_concurrency()) - 1u) {} - deferrer::~deferrer() noexcept = default; - stdex::jobber& deferrer::worker() noexcept { return worker_; } diff --git a/sources/enduro2d/high/address.cpp b/sources/enduro2d/high/address.cpp index df4133cd..63d2dde0 100644 --- a/sources/enduro2d/high/address.cpp +++ b/sources/enduro2d/high/address.cpp @@ -17,7 +17,7 @@ namespace } } -namespace e2d { namespace address +namespace e2d::address { str parent(str_view address) { const auto sep_e = str_view_search(address, address_separator); @@ -36,4 +36,4 @@ namespace e2d { namespace address const auto sep_d = std::distance(address.begin(), sep_e); return str(address.substr(static_cast(sep_d) + address_separator.size())); } -}} +} diff --git a/sources/enduro2d/high/atlas.cpp b/sources/enduro2d/high/atlas.cpp index a4061818..bdaa7358 100644 --- a/sources/enduro2d/high/atlas.cpp +++ b/sources/enduro2d/high/atlas.cpp @@ -8,9 +8,6 @@ namespace e2d { - atlas::atlas() = default; - atlas::~atlas() noexcept = default; - atlas::atlas(atlas&& other) noexcept { assign(std::move(other)); } diff --git a/sources/enduro2d/high/flipbook.cpp b/sources/enduro2d/high/flipbook.cpp index 5f748e73..1662e6a0 100644 --- a/sources/enduro2d/high/flipbook.cpp +++ b/sources/enduro2d/high/flipbook.cpp @@ -8,9 +8,6 @@ namespace e2d { - flipbook::flipbook() = default; - flipbook::~flipbook() noexcept = default; - flipbook::flipbook(flipbook&& other) noexcept { assign(std::move(other)); } diff --git a/sources/enduro2d/high/model.cpp b/sources/enduro2d/high/model.cpp index 9d264333..503f35ef 100644 --- a/sources/enduro2d/high/model.cpp +++ b/sources/enduro2d/high/model.cpp @@ -144,9 +144,6 @@ namespace namespace e2d { - model::model() = default; - model::~model() noexcept = default; - model::model(model&& other) noexcept { assign(std::move(other)); } diff --git a/sources/enduro2d/high/prefab.cpp b/sources/enduro2d/high/prefab.cpp index a96ddaec..e8a350c9 100644 --- a/sources/enduro2d/high/prefab.cpp +++ b/sources/enduro2d/high/prefab.cpp @@ -8,9 +8,6 @@ namespace e2d { - prefab::prefab() = default; - prefab::~prefab() noexcept = default; - prefab::prefab(prefab&& other) noexcept { assign(std::move(other)); } diff --git a/sources/enduro2d/high/sprite.cpp b/sources/enduro2d/high/sprite.cpp index ef21d1c6..f3d16f32 100644 --- a/sources/enduro2d/high/sprite.cpp +++ b/sources/enduro2d/high/sprite.cpp @@ -8,9 +8,6 @@ namespace e2d { - sprite::sprite() = default; - sprite::~sprite() noexcept = default; - sprite::sprite(sprite&& other) noexcept { assign(std::move(other)); } diff --git a/sources/enduro2d/high/systems/render_system_impl/render_system_base.hpp b/sources/enduro2d/high/systems/render_system_impl/render_system_base.hpp index d0bf3213..81900f63 100644 --- a/sources/enduro2d/high/systems/render_system_impl/render_system_base.hpp +++ b/sources/enduro2d/high/systems/render_system_impl/render_system_base.hpp @@ -8,7 +8,7 @@ #include -namespace e2d { namespace render_system_impl +namespace e2d::render_system_impl { struct index_u8 { using type = u8; @@ -44,4 +44,4 @@ namespace e2d { namespace render_system_impl .add_attribute("a_tint").normalized(); } }; -}} +} diff --git a/sources/enduro2d/high/systems/render_system_impl/render_system_batcher.hpp b/sources/enduro2d/high/systems/render_system_impl/render_system_batcher.hpp index aabae9f6..4f65ce22 100644 --- a/sources/enduro2d/high/systems/render_system_impl/render_system_batcher.hpp +++ b/sources/enduro2d/high/systems/render_system_impl/render_system_batcher.hpp @@ -10,7 +10,7 @@ #include -namespace e2d { namespace render_system_impl +namespace e2d::render_system_impl { class bad_batcher_operation final : public exception { public: @@ -71,9 +71,9 @@ namespace e2d { namespace render_system_impl static std::size_t calculate_new_buffer_size( std::size_t esize, std::size_t osize, std::size_t nsize); }; -}} +} -namespace e2d { namespace render_system_impl +namespace e2d::render_system_impl { template < typename Index, typename Vertex > batcher::batcher(debug& debug, render& render) @@ -266,4 +266,4 @@ namespace e2d { namespace render_system_impl } return math::max(osize * 2u, nsize); } -}} +} diff --git a/sources/enduro2d/high/systems/render_system_impl/render_system_drawer.cpp b/sources/enduro2d/high/systems/render_system_impl/render_system_drawer.cpp index 1c239264..751ec273 100644 --- a/sources/enduro2d/high/systems/render_system_impl/render_system_drawer.cpp +++ b/sources/enduro2d/high/systems/render_system_impl/render_system_drawer.cpp @@ -21,7 +21,7 @@ namespace const str_hash sprite_texture_sampler_hash = "u_texture"; } -namespace e2d { namespace render_system_impl +namespace e2d::render_system_impl { // // drawer::context @@ -223,4 +223,4 @@ namespace e2d { namespace render_system_impl : engine_(e) , render_(r) , batcher_(d, r) {} -}} +} diff --git a/sources/enduro2d/high/systems/render_system_impl/render_system_drawer.hpp b/sources/enduro2d/high/systems/render_system_impl/render_system_drawer.hpp index 8a6a1eca..641e8136 100644 --- a/sources/enduro2d/high/systems/render_system_impl/render_system_drawer.hpp +++ b/sources/enduro2d/high/systems/render_system_impl/render_system_drawer.hpp @@ -14,7 +14,7 @@ #include "render_system_base.hpp" #include "render_system_batcher.hpp" -namespace e2d { namespace render_system_impl +namespace e2d::render_system_impl { class bad_drawer_operation final : public exception { public: @@ -68,9 +68,9 @@ namespace e2d { namespace render_system_impl render& render_; batcher_type batcher_; }; -}} +} -namespace e2d { namespace render_system_impl +namespace e2d::render_system_impl { template < typename F > void drawer::with(const camera& cam, const const_node_iptr& cam_n, F&& f) { @@ -78,4 +78,4 @@ namespace e2d { namespace render_system_impl std::forward(f)(ctx); ctx.flush(); } -}} +}