Skip to content

Commit 188c3f0

Browse files
committed
Refactor uses of unsigned for buffer sizes and item counts to size_t.
1 parent c25965d commit 188c3f0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cores/esp8266/MultiDelegate.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ namespace detail
8787
};
8888
};
8989

90-
template< typename Delegate, typename R = void, bool ISQUEUE = false, unsigned QUEUE_CAPACITY = 32, typename... P>
90+
template< typename Delegate, typename R = void, bool ISQUEUE = false, size_t QUEUE_CAPACITY = 32, typename... P>
9191
class MultiDelegatePImpl
9292
{
9393
public:
@@ -176,7 +176,7 @@ namespace detail
176176
Node_t* first = nullptr;
177177
Node_t* last = nullptr;
178178
Node_t* unused = nullptr;
179-
unsigned nodeCount = 0;
179+
size_t nodeCount = 0;
180180

181181
// Returns a pointer to an unused Node_t,
182182
// or if none are available allocates a new one,
@@ -370,7 +370,7 @@ namespace detail
370370
}
371371
};
372372

373-
template< typename Delegate, typename R = void, bool ISQUEUE = false, unsigned QUEUE_CAPACITY = 32>
373+
template< typename Delegate, typename R = void, bool ISQUEUE = false, size_t QUEUE_CAPACITY = 32>
374374
class MultiDelegateImpl : public MultiDelegatePImpl<Delegate, R, ISQUEUE, QUEUE_CAPACITY>
375375
{
376376
protected:
@@ -456,16 +456,16 @@ namespace detail
456456
}
457457
};
458458

459-
template< typename Delegate, typename R, bool ISQUEUE, unsigned QUEUE_CAPACITY, typename... P> class MultiDelegate;
459+
template< typename Delegate, typename R, bool ISQUEUE, size_t QUEUE_CAPACITY, typename... P> class MultiDelegate;
460460

461-
template< typename Delegate, typename R, bool ISQUEUE, unsigned QUEUE_CAPACITY, typename... P>
461+
template< typename Delegate, typename R, bool ISQUEUE, size_t QUEUE_CAPACITY, typename... P>
462462
class MultiDelegate<Delegate, R(P...), ISQUEUE, QUEUE_CAPACITY> : public MultiDelegatePImpl<Delegate, R, ISQUEUE, QUEUE_CAPACITY, P...>
463463
{
464464
public:
465465
using MultiDelegatePImpl<Delegate, R, ISQUEUE, QUEUE_CAPACITY, P...>::MultiDelegatePImpl;
466466
};
467467

468-
template< typename Delegate, typename R, bool ISQUEUE, unsigned QUEUE_CAPACITY>
468+
template< typename Delegate, typename R, bool ISQUEUE, size_t QUEUE_CAPACITY>
469469
class MultiDelegate<Delegate, R(), ISQUEUE, QUEUE_CAPACITY> : public MultiDelegateImpl<Delegate, R, ISQUEUE, QUEUE_CAPACITY>
470470
{
471471
public:
@@ -493,7 +493,7 @@ It is designed to be used with Delegate, the efficient runtime wrapper for C fun
493493
allocates from the heap. Unused items are not returned to the heap, but are managed by the MultiDelegate
494494
instance during its own lifetime for efficiency.
495495
*/
496-
template< typename Delegate, bool ISQUEUE = false, unsigned QUEUE_CAPACITY = 32>
496+
template< typename Delegate, bool ISQUEUE = false, size_t QUEUE_CAPACITY = 32>
497497
class MultiDelegate : public detail::MultiDelegate<Delegate, typename Delegate::target_type, ISQUEUE, QUEUE_CAPACITY>
498498
{
499499
public:

0 commit comments

Comments
 (0)