8000 unsigned/int instead of (u)int32_t gives lower memory footprint on 8b… · dok-net/arduino-esp8266@c25965d · GitHub
[go: up one dir, main page]

Skip to content

Commit c25965d

Browse files
committed
unsigned/int instead of (u)int32_t gives lower memory footprint on 8bit devices.
1 parent ae7b4f6 commit c25965d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

cores/esp8266/MultiDelegate.h

Lines changed: 7 additions & 7 deletions
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, uint32_t QUEUE_CAPACITY = 32, typename... P>
90+
template< typename Delegate, typename R = void, bool ISQUEUE = false, unsigned 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-
uint32_t nodeCount = 0;
179+
unsigned 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, uint32_t QUEUE_CAPACITY = 32>
373+
template< typename Delegate, typename R = void, bool ISQUEUE = false, unsigned 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, uint32_t QUEUE_CAPACITY, typename... P> class MultiDelegate;
459+
template< typename Delegate, typename R, bool ISQUEUE, unsigned QUEUE_CAPACITY, typename... P> class MultiDelegate;
460460

461-
template< typename Delegate, typename R, bool ISQUEUE, uint32_t QUEUE_CAPACITY, typename... P>
461+
template< typename Delegate, typename R, bool ISQUEUE, unsigned 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, uint32_t QUEUE_CAPACITY>
468+
template< typename Delegate, typename R, bool ISQUEUE, unsigned 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, uint32_t QUEUE_CAPACITY = 32>
496+
template< typename Delegate, bool ISQUEUE = false, unsigned 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)
0