From 8f2096ff55c914973e49a296a89e50766244bc24 Mon Sep 17 00:00:00 2001 From: kumar8600 Date: Sun, 12 Oct 2014 21:10:03 +0900 Subject: Make return size_t at functions Event and Pool --- entityx/Event.h | 2 +- entityx/help/Pool.h | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/entityx/Event.h b/entityx/Event.h index f238497..ec048d7 100644 --- a/entityx/Event.h +++ b/entityx/Event.h @@ -75,7 +75,7 @@ class BaseReceiver { } // Return number of signals connected to this receiver. - int connected_signals() const { + size_t connected_signals() const { size_t size = 0; for (auto connection : connections_) { if (!connection.first.expired()) { diff --git a/entityx/help/Pool.h b/entityx/help/Pool.h index ac959d2..c0283d2 100644 --- a/entityx/help/Pool.h +++ b/entityx/help/Pool.h @@ -27,13 +27,13 @@ namespace entityx { */ class BasePool { public: - explicit BasePool(int element_size, int chunk_size = 8192) + explicit BasePool(size_t element_size, size_t chunk_size = 8192) : element_size_(element_size), chunk_size_(chunk_size), capacity_(0) {} virtual ~BasePool(); - int size() const { return size_; } - int capacity() const { return capacity_; } - int chunks() const { return blocks_.size(); } + size_t size() const { return size_; } + size_t capacity() const { return capacity_; } + size_t chunks() const { return blocks_.size(); } /// Ensure at least n elements will fit in the pool. inline void expand(int n) { @@ -65,10 +65,10 @@ class BasePool { protected: std::vector blocks_; - int element_size_; - int chunk_size_; - int size_ = 0; - int capacity_; + size_t element_size_; + size_t chunk_size_; + size_t size_ = 0; + size_t capacity_; }; -- cgit v1.2.3