Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubpa committed Aug 20, 2020
1 parent ba65258 commit 3833dac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/UECS/CmptPtr.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Ubpa::UECS {
CmptPtr(Cmpt* p) noexcept : type{ CmptType::Of<Cmpt> }, p{ p }{}

// unchecked
void* Ptr() const noexcept { return p; }
void* const& Ptr() const noexcept { return p; }

CmptType Type() const noexcept { return type; }

Expand Down
2 changes: 1 addition & 1 deletion src/core/EntityMngr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ void EntityMngr::GenEntityJob(World* w, Job* job, SystemFunc* sys) const {
CmptsView{ cmpts.data(), cmpts.size() }
);
for (size_t k = 0; k < cmpts.size(); k++)
reinterpret_cast<uint8_t*&>(cmpts[k]) += sizes[k];
reinterpret_cast<uint8_t*&>(const_cast<void*&>(cmpts[k].Ptr())) += sizes[k];
}
});
}
Expand Down

0 comments on commit 3833dac

Please sign in to comment.