mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Switches NotifyListenerVector to SmallVector (#1004)
This commit is contained in:
committed by
Peter Johnson
parent
ab70220ecf
commit
406e18663d
@@ -10,8 +10,8 @@
|
||||
#ifndef __FRC_ROBORIO__
|
||||
|
||||
#include <memory>
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
|
||||
#include <wpi/SmallVector.h>
|
||||
|
||||
#include "NotifyListener.h"
|
||||
|
||||
@@ -24,8 +24,8 @@ class HalCallbackListenerVectorImpl {
|
||||
struct private_init {};
|
||||
|
||||
public:
|
||||
typedef typename std::vector<HalCallbackListener<ListenerType>>::size_type
|
||||
size_type;
|
||||
typedef typename wpi::SmallVectorImpl<
|
||||
HalCallbackListener<ListenerType>>::size_type size_type;
|
||||
|
||||
// Constructor for creating copies of the vector
|
||||
HalCallbackListenerVectorImpl(const HalCallbackListenerVectorImpl* copyFrom,
|
||||
@@ -64,8 +64,8 @@ class HalCallbackListenerVectorImpl {
|
||||
unsigned int uid);
|
||||
|
||||
private:
|
||||
std::vector<HalCallbackListener<ListenerType>> m_vector;
|
||||
std::vector<unsigned int> m_free;
|
||||
wpi::SmallVector<HalCallbackListener<ListenerType>, 4> m_vector;
|
||||
wpi::SmallVector<unsigned int, 4> m_free;
|
||||
|
||||
// Add a new NotifyListener to the vector. If there are elements on the
|
||||
// freelist,
|
||||
|
||||
Reference in New Issue
Block a user