mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-20 05:15:10 +00:00
Allowing players to join the lobby
This commit is contained in:
@@ -61,14 +61,20 @@ namespace WAL
|
||||
std::optional<ViewEntity<Components...>> _entity;
|
||||
|
||||
public:
|
||||
ViewEntity<Components...> &operator*()
|
||||
using iterator_category = std::forward_iterator_tag;
|
||||
using difference_type = std::ptrdiff_t;
|
||||
using value_type = ViewEntity<Components...>;
|
||||
using pointer = value_type *;
|
||||
using reference = value_type &;
|
||||
|
||||
reference operator*()
|
||||
{
|
||||
if (!this->_entity)
|
||||
this->_entity.emplace(*this->_it);
|
||||
return *this->_entity;
|
||||
}
|
||||
|
||||
ViewEntity<Components...> *operator->()
|
||||
pointer operator->()
|
||||
{
|
||||
if (!this->_entity)
|
||||
this->_entity =(*this->_it);
|
||||
|
||||
Reference in New Issue
Block a user