]> git.tdb.fi Git - libs/game.git/commitdiff
Cosmetic fixes
authorMikko Rasa <tdb@tdb.fi>
Fri, 4 Nov 2022 22:42:06 +0000 (00:42 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 4 Nov 2022 22:42:06 +0000 (00:42 +0200)
source/game/owned.h
source/game/pool.cpp
source/game/pool.h

index b305ae21d1aea7f371ab5b9a661f00f09153841b..7159c7d9622a06fd83301b7565dc1d55c0beedcc 100644 (file)
@@ -47,7 +47,7 @@ Owned<T>::Owned(Handle<P> parent, Args &&... args)
                throw std::invalid_argument("Owned::Owned");
 
        Stage &stage = get_stage(*parent);
-       Pool<T> &pool = stage.get_pools().template get_pool<T>();
+       Pool<T> &pool = stage.get_pools().get_pool<T>();
        this->ptr = pool.create(parent, std::forward<Args>(args)...);
        if constexpr(std::is_base_of_v<Component, T>)
        {
@@ -102,7 +102,7 @@ void Owned<T>::destroy()
                parent->remove_child(*this);
        }
 
-       Pool<T> &pool = stage.get_pools().template get_pool<T>();
+       Pool<T> &pool = stage.get_pools().get_pool<T>();
        pool.destroy(this->ptr);
 }
 
index 901e09ef41dc0df54ee11d269aad203928cc7419..95e1b4a261c3137865770d38e0894efb3b03056d 100644 (file)
@@ -59,7 +59,7 @@ PoolBase::~PoolBase()
 void PoolBase::destroy_all()
 {
        if(object_count>0)
-               IO::print(IO::cerr, "Warning: pool is being destroyed but has %d live objects", object_count);
+               IO::print(IO::cerr, "Warning: pool is being destroyed but has %d live objects\n", object_count);
 
        unsigned block_count = capacity/BLOCK_SIZE;
        for(unsigned i=0; i<block_count; ++i)
index 16801f4d48aead654cb53eb57ccff70d84f377b0..9b55e1df5f192e1d844796b2aa80fa3ce81c72d9 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef MSP_GAME_STORAGE_H_
-#define MSP_GAME_STORAGE_H_
+#ifndef MSP_GAME_POOL_H_
+#define MSP_GAME_POOL_H_
 
 #include <cstdint>
 #include <memory>