Ndk: Fix inline warnings on GCC

Former-commit-id: 4ffe5cd1e821160c60cd2d84f6a0d164aa1326f7
This commit is contained in:
Lynix 2015-06-11 14:23:19 +02:00
parent 3b5551ed7a
commit 2a6ec829fe
4 changed files with 76 additions and 76 deletions

View File

@ -22,8 +22,8 @@ namespace Ndk
friend World;
public:
BaseSystem(SystemIndex systemId);
BaseSystem(const BaseSystem&);
inline BaseSystem(SystemIndex systemId);
inline BaseSystem(const BaseSystem&);
BaseSystem(BaseSystem&&) noexcept = default;
~BaseSystem();
@ -31,11 +31,11 @@ namespace Ndk
bool Filters(const Entity* entity) const;
const std::vector<EntityHandle>& GetEntities() const;
SystemIndex GetIndex() const;
World& GetWorld() const;
inline const std::vector<EntityHandle>& GetEntities() const;
inline SystemIndex GetIndex() const;
inline World& GetWorld() const;
bool HasEntity(const Entity* entity) const;
inline bool HasEntity(const Entity* entity) const;
BaseSystem& operator=(const BaseSystem&) = delete;
BaseSystem& operator=(BaseSystem&&) noexcept = default;
@ -43,33 +43,33 @@ namespace Ndk
protected:
template<typename ComponentType> void Excludes();
template<typename ComponentType1, typename ComponentType2, typename... Rest> void Excludes();
void ExcludesComponent(ComponentIndex index);
inline void ExcludesComponent(ComponentIndex index);
static SystemIndex GetNextIndex();
template<typename ComponentType> void Requires();
template<typename ComponentType1, typename ComponentType2, typename... Rest> void Requires();
void RequiresComponent(ComponentIndex index);
inline void RequiresComponent(ComponentIndex index);
template<typename ComponentType> void RequiresAny();
template<typename ComponentType1, typename ComponentType2, typename... Rest> void RequiresAny();
void RequiresAnyComponent(ComponentIndex index);
inline void RequiresAnyComponent(ComponentIndex index);
private:
void AddEntity(Entity* entity);
inline void AddEntity(Entity* entity);
virtual void OnEntityAdded(Entity* entity);
virtual void OnEntityRemoved(Entity* entity);
virtual void OnEntityValidation(Entity* entity, bool justAdded);
void RemoveEntity(Entity* entity);
inline void RemoveEntity(Entity* entity);
void SetWorld(World& world);
inline void SetWorld(World& world);
void ValidateEntity(Entity* entity, bool justAdded);
inline void ValidateEntity(Entity* entity, bool justAdded);
static bool Initialize();
static void Uninitialize();
static inline bool Initialize();
static inline void Uninitialize();
std::vector<EntityHandle> m_entities;
NzBitset<nzUInt64> m_entityBits;

View File

@ -28,40 +28,40 @@ namespace Ndk
void ApplyView() const override;
void EnsureFrustumUpdate() const;
void EnsureProjectionMatrixUpdate() const;
void EnsureViewMatrixUpdate() const;
void EnsureViewportUpdate() const;
inline void EnsureFrustumUpdate() const;
inline void EnsureProjectionMatrixUpdate() const;
inline void EnsureViewMatrixUpdate() const;
inline void EnsureViewportUpdate() const;
float GetAspectRatio() const;
NzVector3f GetEyePosition() const;
NzVector3f GetForward() const;
float GetFOV() const;
const NzFrustumf& GetFrustum() const;
unsigned int GetLayer() const;
const NzMatrix4f& GetProjectionMatrix() const;
const NzRenderTarget* GetTarget() const;
const NzRectf& GetTargetRegion() const;
const NzMatrix4f& GetViewMatrix() const;
const NzRecti& GetViewport() const;
float GetZFar() const;
float GetZNear() const;
inline float GetAspectRatio() const;
inline NzVector3f GetEyePosition() const;
inline NzVector3f GetForward() const;
inline float GetFOV() const;
inline const NzFrustumf& GetFrustum() const;
inline unsigned int GetLayer() const;
inline const NzMatrix4f& GetProjectionMatrix() const;
inline const NzRenderTarget* GetTarget() const;
inline const NzRectf& GetTargetRegion() const;
inline const NzMatrix4f& GetViewMatrix() const;
inline const NzRecti& GetViewport() const;
inline float GetZFar() const;
inline float GetZNear() const;
void SetFOV(float fov);
void SetLayer(unsigned int layer);
void SetTarget(const NzRenderTarget* renderTarget);
void SetTargetRegion(const NzRectf& region);
void SetViewport(const NzRecti& viewport);
void SetZFar(float zFar);
void SetZNear(float zNear);
inline void SetFOV(float fov);
inline void SetLayer(unsigned int layer);
inline void SetTarget(const NzRenderTarget* renderTarget);
inline void SetTargetRegion(const NzRectf& region);
inline void SetViewport(const NzRecti& viewport);
inline void SetZFar(float zFar);
inline void SetZNear(float zNear);
static ComponentIndex componentIndex;
private:
void InvalidateFrustum() const;
void InvalidateProjectionMatrix() const;
void InvalidateViewMatrix() const;
void InvalidateViewport() const;
inline void InvalidateFrustum() const;
inline void InvalidateProjectionMatrix() const;
inline void InvalidateViewMatrix() const;
inline void InvalidateViewport() const;
void OnAttached() override;
void OnComponentAttached(BaseComponent& component) override;

View File

@ -21,36 +21,36 @@ namespace Ndk
EntityList() = default;
~EntityList() = default;
void Clear();
inline void Clear();
bool Has(const Entity* entity);
bool Has(EntityId entity);
inline bool Has(const Entity* entity);
inline bool Has(EntityId entity);
void Insert(Entity* entity);
inline void Insert(Entity* entity);
void Remove(Entity* entity);
inline void Remove(Entity* entity);
// Interface STD
Container::iterator begin();
Container::const_iterator begin() const;
// STL API
inline Container::iterator begin();
inline Container::const_iterator begin() const;
Container::const_iterator cbegin() const;
Container::const_iterator cend() const;
Container::const_reverse_iterator crbegin() const;
Container::const_reverse_iterator crend() const;
inline Container::const_iterator cbegin() const;
inline Container::const_iterator cend() const;
inline Container::const_reverse_iterator crbegin() const;
inline Container::const_reverse_iterator crend() const;
bool empty() const;
inline bool empty() const;
Container::iterator end();
Container::const_iterator end() const;
inline Container::iterator end();
inline Container::const_iterator end() const;
Container::reverse_iterator rbegin();
Container::const_reverse_iterator rbegin() const;
inline Container::reverse_iterator rbegin();
inline Container::const_reverse_iterator rbegin() const;
Container::reverse_iterator rend();
Container::const_reverse_iterator rend() const;
inline Container::reverse_iterator rend();
inline Container::const_reverse_iterator rend() const;
Container::size_type size() const;
inline Container::size_type size() const;
private:
std::vector<EntityHandle> m_entities;

View File

@ -26,42 +26,42 @@ namespace Ndk
public:
using EntityList = std::vector<EntityHandle>;
World(bool addDefaultSystems = true);
inline World(bool addDefaultSystems = true);
~World();
void AddDefaultSystems();
BaseSystem& AddSystem(std::unique_ptr<BaseSystem>&& system);
inline BaseSystem& AddSystem(std::unique_ptr<BaseSystem>&& system);
template<typename SystemType, typename... Args> SystemType& AddSystem(Args&&... args);
const EntityHandle& CreateEntity();
EntityList CreateEntities(unsigned int count);
inline EntityList CreateEntities(unsigned int count);
void Clear();
const EntityHandle& GetEntity(EntityId id);
const EntityList& GetEntities();
BaseSystem& GetSystem(SystemIndex index);
inline const EntityList& GetEntities();
inline BaseSystem& GetSystem(SystemIndex index);
template<typename SystemType> SystemType& GetSystem();
bool HasSystem(SystemIndex index) const;
inline bool HasSystem(SystemIndex index) const;
template<typename SystemType> bool HasSystem() const;
void KillEntity(Entity* entity);
void KillEntities(const EntityList& list);
inline void KillEntities(const EntityList& list);
bool IsEntityValid(const Entity* entity) const;
bool IsEntityIdValid(EntityId id) const;
inline bool IsEntityValid(const Entity* entity) const;
inline bool IsEntityIdValid(EntityId id) const;
void RemoveAllSystems();
void RemoveSystem(SystemIndex index);
inline void RemoveAllSystems();
inline void RemoveSystem(SystemIndex index);
template<typename SystemType> void RemoveSystem();
void Update();
private:
void Invalidate();
void Invalidate(EntityId id);
inline void Invalidate();
inline void Invalidate(EntityId id);
struct EntityBlock
{