Skip to content

Commit

Permalink
Make changes according to PR #246
Browse files Browse the repository at this point in the history
  • Loading branch information
Capital-Asterisk authored and jonesmz committed Sep 25, 2023
1 parent 6fa78ea commit 2ed0579
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
8 changes: 0 additions & 8 deletions src/osp/core/copymove_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
*/
#pragma once

//#define OSP_AUX_MOVECOPY_CTOR(type, copy_is, move_is, move_constexpr, copy_constexpr, opt_noexcept) \
// copy_constexpr type(type const& copy) opt_noexcept = copy_is; \
// move_constexpr type(type&& move) opt_noexcept = move_is;

//#define OSP_AUX_MOVECOPY_ASGN(type, copy_is, move_is, move_constexpr, copy_constexpr, opt_noexcept) \
// copy_constexpr type& operator=(type const& copy) opt_noexcept = copy_is; \
// move_constexpr type& operator=(type&& move) opt_noexcept = move_is;

#define OSP_MOVE_COPY_CTOR_ASSIGN(type) \
Type (Type const& copy) = default; \
Type (Type&& move) = default; \
Expand Down
5 changes: 3 additions & 2 deletions src/osp/core/strong_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ struct StrongId
using entity_type = INT_T; // Name used for entt compatibility

constexpr StrongId() noexcept = default;
constexpr StrongId(StrongId const& copy) noexcept
: m_value{copy.m_value}
{ };
constexpr explicit StrongId(INT_T const value) noexcept
: m_value{value}
{ };

OSP_MOVE_COPY_CTOR_ASSIGN_CONSTEXPR_NOEXCEPT(StrongId);

constexpr explicit operator std::size_t() const noexcept
{
return m_value;
Expand Down
2 changes: 2 additions & 0 deletions src/osp/drawing/draw_ent.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ namespace osp::draw

using DrawEnt = StrongId<uint32_t, struct DummyForDrawEnt>;

using MaterialId = StrongId<uint32_t, struct DummyForMaterialId>;

} // namespace osp::draw
2 changes: 0 additions & 2 deletions src/osp/drawing/drawing.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ namespace osp::draw
using DrawEntVec_t = std::vector<DrawEnt>;
using DrawEntSet_t = BitVector_t;

enum class MaterialId : uint32_t { };

struct Material
{
DrawEntSet_t m_ents;
Expand Down
1 change: 0 additions & 1 deletion src/testapp/sessions/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ void create_materials(
for (int i = 0; i < count; ++i)
{
[[maybe_unused]] MaterialId const mat = rScnRender.m_materialIds.create();
LGRN_ASSERT(int(mat) == i);
}

rScnRender.m_materials.resize(count);
Expand Down

0 comments on commit 2ed0579

Please sign in to comment.