mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-14 16:09:06 +07:00
high to c++17
This commit is contained in:
@@ -13,7 +13,7 @@ namespace e2d
|
||||
class deferrer final : public module<deferrer> {
|
||||
public:
|
||||
deferrer();
|
||||
~deferrer() noexcept final;
|
||||
~deferrer() noexcept final = default;
|
||||
|
||||
stdex::jobber& worker() noexcept;
|
||||
const stdex::jobber& worker() const noexcept;
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
#include "_high.hpp"
|
||||
|
||||
namespace e2d { namespace address
|
||||
namespace e2d::address
|
||||
{
|
||||
str parent(str_view address);
|
||||
str nested(str_view address);
|
||||
}}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace e2d
|
||||
vector<std::size_t> frames;
|
||||
};
|
||||
public:
|
||||
flipbook();
|
||||
~flipbook() noexcept;
|
||||
flipbook() = default;
|
||||
~flipbook() noexcept = default;
|
||||
|
||||
flipbook(flipbook&& other) noexcept;
|
||||
flipbook& operator=(flipbook&& other) noexcept;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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_;
|
||||
}
|
||||
|
||||
@@ -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<std::size_t>(sep_d) + address_separator.size()));
|
||||
}
|
||||
}}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
|
||||
namespace e2d
|
||||
{
|
||||
atlas::atlas() = default;
|
||||
atlas::~atlas() noexcept = default;
|
||||
|
||||
atlas::atlas(atlas&& other) noexcept {
|
||||
assign(std::move(other));
|
||||
}
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
|
||||
namespace e2d
|
||||
{
|
||||
flipbook::flipbook() = default;
|
||||
flipbook::~flipbook() noexcept = default;
|
||||
|
||||
flipbook::flipbook(flipbook&& other) noexcept {
|
||||
assign(std::move(other));
|
||||
}
|
||||
|
||||
@@ -144,9 +144,6 @@ namespace
|
||||
|
||||
namespace e2d
|
||||
{
|
||||
model::model() = default;
|
||||
model::~model() noexcept = default;
|
||||
|
||||
model::model(model&& other) noexcept {
|
||||
assign(std::move(other));
|
||||
}
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
|
||||
namespace e2d
|
||||
{
|
||||
prefab::prefab() = default;
|
||||
prefab::~prefab() noexcept = default;
|
||||
|
||||
prefab::prefab(prefab&& other) noexcept {
|
||||
assign(std::move(other));
|
||||
}
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
|
||||
namespace e2d
|
||||
{
|
||||
sprite::sprite() = default;
|
||||
sprite::~sprite() noexcept = default;
|
||||
|
||||
sprite::sprite(sprite&& other) noexcept {
|
||||
assign(std::move(other));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#include <enduro2d/high/_high.hpp>
|
||||
|
||||
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<color32>("a_tint").normalized();
|
||||
}
|
||||
};
|
||||
}}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include <enduro2d/high/assets/material_asset.hpp>
|
||||
|
||||
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<Index, Vertex>::batcher(debug& debug, render& render)
|
||||
@@ -266,4 +266,4 @@ namespace e2d { namespace render_system_impl
|
||||
}
|
||||
return math::max(osize * 2u, nsize);
|
||||
}
|
||||
}}
|
||||
}
|
||||
|
||||
@@ -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) {}
|
||||
}}
|
||||
}
|
||||
|
||||
@@ -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>(f)(ctx);
|
||||
ctx.flush();
|
||||
}
|
||||
}}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user