OpenTTD

Public Member Functions | Protected Attributes
SmallVector< T, S > Class Template Reference

Simple vector template class. More...

`#include <smallvec_type.hpp>`

Inheritance diagram for SmallVector< T, S >:

## Public Member Functions
| SmallVector (const SmallVector &other)
| Copy constructor. More...
template<uint X>
| SmallVector (const SmallVector< T, X > &other)
| Generic copy constructor. More...
SmallVector & | operator= (const SmallVector &other)
| Assignment. More...
template<uint X>
SmallVector & | operator= (const SmallVector< T, X > &other)
| Generic assignment. More...
template<uint X>
void | Assign (const SmallVector< T, X > &other)
| Assign items from other vector.
void | Clear ()
| Remove all items from the list.
void | Reset ()
| Remove all items from the list and free allocated memory.
void | Compact ()
| Compact the list down to the smallest block size boundary.
T * | Append (uint to_add=1)
| Append an item and return it. More...
void | Resize (uint num_items)
| Set the size of the vector, effectively truncating items from the end or appending uninitialised ones. More...
const T * | Find (const T &item) const
| Search for the first occurrence of an item. More...
T * | Find (const T &item)
| Search for the first occurrence of an item. More...
int | FindIndex (const T &item) const
| Search for the first occurrence of an item. More...
bool | Contains (const T &item) const
| Tests whether a item is present in the vector. More...
void | Erase (T *item)
| Removes given item from this vector. More...
void | ErasePreservingOrder (uint pos, uint count=1)
| Remove items from the vector while preserving the order of other items. More...
bool | Include (const T &item)
| Tests whether a item is present in the vector, and appends it to the end if not. More...
uint | Length () const
| Get the number of items in the list. More...
const T * | Begin () const
| Get the pointer to the first item (const) More...
T * | Begin ()
| Get the pointer to the first item. More...
const T * | End () const
| Get the pointer behind the last valid item (const) More...
T * | End ()
| Get the pointer behind the last valid item. More...
const T * | Get (uint index) const
| Get the pointer to item "number" (const) More...
T * | Get (uint index)
| Get the pointer to item "number". More...
const T & | operator[] (uint index) const
| Get item "number" (const) More...
T & | operator[] (uint index)
| Get item "number". More...

## Protected Attributes
T * | data
| The pointer to the first item.
uint | items
| The number of items stored.
uint | capacity
| The available space for storing items.

## Detailed Description

### template<typename T, uint S>
class SmallVector< T, S >

Simple vector template class.

Note
  There are no asserts in the class so you have to care about that you grab an item which is inside the list.

Template Parameters

  T | The type of the items stored
  S | The steps of allocation

Definition at line 29 of file smallvec_type.hpp.

## Constructor & Destructor Documentation

## ◆ SmallVector() [1/2]

template<typename T, uint S>

SmallVector< T, S >::SmallVector | ( | const SmallVector< T, S > & | other | ) |
| inline

Copy constructor.

Parameters

  other | The other vector to copy.

Definition at line 42 of file smallvec_type.hpp.

## ◆ SmallVector() [2/2]

template<typename T, uint S>
template<uint X>

SmallVector< T, S >::SmallVector | ( | const SmallVector< T, X > & | other | ) |
| inline

Generic copy constructor.

Parameters

  other | The other vector to copy.

Definition at line 52 of file smallvec_type.hpp.

## Member Function Documentation

## ◆ Append()

template<typename T, uint S>

T* SmallVector< T, S >::Append | ( | uint | to_add = `1` | ) |
| inline

Append an item and return it.

Parameters

  to_add | the number of items to append

Returns
  pointer to newly allocated item

Definition at line 134 of file smallvec_type.hpp.

Referenced by NetworkClientListPopupWindow::AddAction(), LanguageScanner::AddFile(), Hotkey::AddKeycode(), AddNearbyStation(), LinkGraph::AddNode(), AddStringForMapping(), AllocateSound(), AlterVehicleListOrder(), SmallVector< SmallPair< uint32, SmallPair< size_t, const void *> >, 16 >::Assign(), BaseVehicleListWindow::BuildActionDropdownList(), BuildAirportWindow::BuildAirportClassDropDown(), NetworkContentListWindow::BuildContentList(), BuildDepotVehicleList(), StoryBookWindow::BuildDropDownList(), NetworkGameWindow::BuildGUINetworkGameList(), RefitWindow::BuildRefitList(), CmdConvertRail(), CmdSetTimetableStart(), IndustryCargoesWindow::ComputeCargoDisplay(), IndustryCargoesWindow::ComputeIndustryDisplay(), ClientNetworkContentSocketHandler::DownloadContentInfo(), ClientNetworkContentSocketHandler::DownloadSelectedContent(), GetBindAddresses(), GetCargoSummaryOfArticulatedVehicle(), Layouter::GetFont(), GRFConfig::GRFConfig(), HandleParameterInfo(), IniLoadSettingList(), InitNewGRFFile(), Window::InvalidateData(), TextfileWindow::LoadTextfile(), MakeTrainBackup(), NetworkFindBroadcastIPsInternal(), NetworkServerKickOrBanIP(), NetworkUDPSocketHandler::NetworkUDPSocketHandler(), FallbackParagraphLayout::NextLine(), ReplaceVehicleWindow::OnClick(), PoolBase::PoolBase(), PopupMainCompanyToolbMenu(), PopupMainToolbMenu(), ClientNetworkContentSocketHandler::Receive_SERVER_INFO(), ClientNetworkContentSocketHandler::ReverseLookupDependency(), ClientNetworkContentSocketHandler::ReverseLookupTreeDependency(), ShowMissingContentWindow(), NewGRFWindow::TagNameFilter(), TCPConnecter::TCPConnecter(), ToolbarOptionsClick(), WindowDesc::WindowDesc(), TranslationWriter::Write(), MemoryDumper::WriteByte(), and StringNameWriter::WriteStringID().

## ◆ Begin() [1/2]

template<typename T, uint S>

const T* SmallVector< T, S >::Begin | ( |  | ) | const
| inline

Get the pointer to the first item (const)

Returns
  the pointer to the first item

Definition at line 272 of file smallvec_type.hpp.

Referenced by TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::AcceptClient(), AddCargoDelivery(), AfterLoadGRFs(), SmallVector< SmallPair< uint32, SmallPair< size_t, const void *> >, 16 >::Assign(), ClientNetworkContentSocketHandler::Begin(), StoryBookWindow::BuildDropDownList(), TCPConnecter::CheckCallbacks(), ClientNetworkContentSocketHandler::CheckDependencyState(), PoolBase::Clean(), LoadCheckData::Clear(), ClientNetworkContentSocketHandler::Clear(), NetworkUDPSocketHandler::Close(), TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::CloseListeners(), CmdConvertRail(), CmdSetTimetableStart(), ClientNetworkContentSocketHandler::DownloadSelectedContent(), ClientNetworkContentSocketHandler::DownloadSelectedContentFallback(), ClientNetworkContentSocketHandler::DownloadSelectedContentHTTP(), NetworkClientListPopupWindow::DrawWidget(), EngList_Sort(), NetworkContentListWindow::FilterContentList(), FinaliseAirportsArray(), FinaliseHouseArray(), FinaliseIndustriesArray(), FinaliseObjectsArray(), GRFConfig::FinalizeParameterInfo(), FindClearedObject(), FindScenario(), GetBindAddresses(), ClientNetworkContentSocketHandler::GetContent(), StoryBookWindow::GetContentHeight(), BaseSet< GraphicsSet, MAX_GFT, true >::GetDescription(), GetFileByFilename(), GetFileByGRFID(), GetLanguage(), LanguageMap::GetMapping(), LanguageMap::GetReverseMapping(), StoryBookWindow::GetSelPageNum(), GetUnitNumberDigits(), NetworkHTTPSocketHandler::HTTPReceive(), IniSaveSettingList(), TCPConnecter::KillAll(), NetworkUDPSocketHandler::Listen(), WindowDesc::LoadFromConfig(), MoveWaypointsToBaseStations(), NetworkFindBroadcastIPs(), NetworkServerKickOrBanIP(), NetworkUDPBroadCast(), NetworkUDPSocketHandler::NetworkUDPSocketHandler(), FallbackParagraphLayout::NextLine(), ClientNetworkContentSocketHandler::OnConnect(), ClientNetworkContentSocketHandler::OnDisconnect(), ClientNetworkContentSocketHandler::OnDownloadComplete(), ClientNetworkContentSocketHandler::OnDownloadProgress(), NetworkContentListWindow::OnInvalidateData(), ClientNetworkContentSocketHandler::OnReceiveContentInfo(), Window::ProcessScheduledInvalidations(), ClientNetworkContentSocketHandler::Receive_SERVER_INFO(), NetworkUDPSocketHandler::ReceivePackets(), RegisterGameTranslation(), PacketReader::Reset(), ResetCustomAirports(), ResetCustomHouses(), ResetCustomIndustries(), ResetCustomObjects(), ResetCustomStations(), ResetNewGRF(), RestoreTrainBackup(), ClientNetworkContentSocketHandler::ReverseLookupDependency(), ClientNetworkContentSocketHandler::ReverseLookupTreeDependency(), WindowDesc::SaveToConfig(), ClientNetworkContentSocketHandler::SelectAll(), ClientNetworkContentSocketHandler::SelectUpgrade(), NetworkUDPSocketHandler::SendPacket(), NetworkContentListWindow::SortContentList(), ClientNetworkContentSocketHandler::UnselectAll(), GameOptionsWindow::UpdateWidgetSize(), NetworkClientListPopupWindow::UpdateWidgetSize(), ViewportDrawBoundingBoxes(), ViewportSortParentSprites(), BaseSet< GraphicsSet, MAX_GFT, true >::~BaseSet(), ClientNetworkContentSocketHandler::~ClientNetworkContentSocketHandler(), FreeTypeFontCache::~FreeTypeFontCache(), and NetworkContentDownloadStatusWindow::~NetworkContentDownloadStatusWindow().

## ◆ Begin() [2/2]

template<typename T, uint S>

T* SmallVector< T, S >::Begin | ( |  | ) |
| inline

Get the pointer to the first item.

Returns
  the pointer to the first item

Definition at line 282 of file smallvec_type.hpp.

## ◆ Contains()

template<typename T, uint S>

bool SmallVector< T, S >::Contains | ( | const T & | item | ) | const
| inline

Tests whether a item is present in the vector.

The '!=' operator of T is used for comparison.

Parameters

  item | Item to test for

Returns
  true iff the item is present

Definition at line 213 of file smallvec_type.hpp.

Referenced by RefitWindow::BuildRefitList(), ClientNetworkContentSocketHandler::DownloadContentInfo(), BuildVehicleWindow::FilterEngineList(), FindIndustryToDeliver(), GetBestFittingSubType(), GetRailTypeByLabel(), and NetworkFindBroadcastIPsInternal().

## ◆ End() [1/2]

template<typename T, uint S>

const T* SmallVector< T, S >::End | ( |  | ) | const
| inline

Get the pointer behind the last valid item (const)

Returns
  the pointer behind the last valid item

Definition at line 292 of file smallvec_type.hpp.

Referenced by TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::AcceptClient(), AddCargoDelivery(), AfterLoadGRFs(), StoryBookWindow::BuildDropDownList(), ChangeGRFParamValueNames(), TCPConnecter::CheckCallbacks(), ClientNetworkContentSocketHandler::CheckDependencyState(), PoolBase::Clean(), LoadCheckData::Clear(), ClientNetworkContentSocketHandler::Clear(), NetworkUDPSocketHandler::Close(), TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::CloseListeners(), CmdConvertRail(), CmdSetTimetableStart(), ClientNetworkContentSocketHandler::DownloadSelectedContent(), ClientNetworkContentSocketHandler::DownloadSelectedContentHTTP(), NetworkClientListPopupWindow::DrawWidget(), ClientNetworkContentSocketHandler::End(), NetworkContentListWindow::FilterContentList(), FinaliseAirportsArray(), FinaliseHouseArray(), FinaliseIndustriesArray(), FinaliseObjectsArray(), GRFConfig::FinalizeParameterInfo(), FindClearedObject(), FindScenario(), ReplaceVehicleWindow::GenerateLists(), GetBindAddresses(), GetCargoSummaryOfArticulatedVehicle(), ClientNetworkContentSocketHandler::GetContent(), StoryBookWindow::GetContentHeight(), BaseSet< GraphicsSet, MAX_GFT, true >::GetDescription(), GetFileByFilename(), GetFileByGRFID(), FreeTypeFontCache::GetFontTable(), GetLanguage(), LanguageMap::GetMapping(), LanguageMap::GetReverseMapping(), StoryBookWindow::GetSelPageNum(), GetUnitNumberDigits(), NetworkHTTPSocketHandler::HTTPReceive(), IniSaveSettingList(), TCPConnecter::KillAll(), NetworkUDPSocketHandler::Listen(), WindowDesc::LoadFromConfig(), MoveWaypointsToBaseStations(), NetworkFindBroadcastIPs(), NetworkServerKickOrBanIP(), NetworkUDPBroadCast(), NetworkUDPSocketHandler::NetworkUDPSocketHandler(), ClientNetworkContentSocketHandler::OnConnect(), ClientNetworkContentSocketHandler::OnDisconnect(), ClientNetworkContentSocketHandler::OnDownloadComplete(), ClientNetworkContentSocketHandler::OnDownloadProgress(), NetworkContentListWindow::OnInvalidateData(), ClientNetworkContentSocketHandler::OnReceiveContentInfo(), Window::ProcessScheduledInvalidations(), ClientNetworkContentSocketHandler::Receive_SERVER_INFO(), NetworkUDPSocketHandler::ReceivePackets(), RegisterGameTranslation(), ResetCustomAirports(), ResetCustomHouses(), ResetCustomIndustries(), ResetCustomObjects(), ResetCustomStations(), Layouter::ResetFontCache(), ResetNewGRF(), RestoreTrainBackup(), ClientNetworkContentSocketHandler::ReverseLookupDependency(), ClientNetworkContentSocketHandler::ReverseLookupTreeDependency(), WindowDesc::SaveToConfig(), ClientNetworkContentSocketHandler::SelectAll(), ClientNetworkContentSocketHandler::SelectUpgrade(), NetworkUDPSocketHandler::SendPacket(), NetworkContentListWindow::SortContentList(), ClientNetworkContentSocketHandler::UnselectAll(), GameOptionsWindow::UpdateWidgetSize(), NetworkClientListPopupWindow::UpdateWidgetSize(), ViewportDrawBoundingBoxes(), ViewportSortParentSprites(), BaseSet< GraphicsSet, MAX_GFT, true >::~BaseSet(), ClientNetworkContentSocketHandler::~ClientNetworkContentSocketHandler(), FreeTypeFontCache::~FreeTypeFontCache(), and NetworkContentDownloadStatusWindow::~NetworkContentDownloadStatusWindow().

## ◆ End() [2/2]

template<typename T, uint S>

T* SmallVector< T, S >::End | ( |  | ) |
| inline

Get the pointer behind the last valid item.

Returns
  the pointer behind the last valid item

Definition at line 302 of file smallvec_type.hpp.

## ◆ Erase()

template<typename T, uint S>

void SmallVector< T, S >::Erase | ( | T * | item | ) |
| inline

Removes given item from this vector.

Parameters

  item | item to remove

Note
  it has to be pointer to item in this map. It is overwritten by the last item.

Definition at line 223 of file smallvec_type.hpp.

Referenced by Hotkey::AddKeycode(), AddNearbyStation(), TCPConnecter::CheckCallbacks(), NetworkHTTPSocketHandler::HTTPReceive(), ClientNetworkContentSocketHandler::RemoveCallback(), WindowDesc::WindowDesc(), and PoolBase::~PoolBase().

## ◆ ErasePreservingOrder()

template<typename T, uint S>

void SmallVector< T, S >::ErasePreservingOrder | ( | uint | pos,
|  | uint | count = `1`
| ) |  |
| inline

Remove items from the vector while preserving the order of other items.

Parameters

  pos | First item to remove.
  count | Number of consecutive items to remove.

Definition at line 234 of file smallvec_type.hpp.

Referenced by RefitWindow::BuildRefitList().

## ◆ Find() [1/2]

template<typename T, uint S>

const T* SmallVector< T, S >::Find | ( | const T & | item | ) | const
| inline

Search for the first occurrence of an item.

The '!=' operator of T is used for comparison.

Parameters

  item | Item to search for

Returns
  The position of the item, or End() when not present

Definition at line 167 of file smallvec_type.hpp.

Referenced by Hotkey::AddKeycode(), GetCargoSummaryOfArticulatedVehicle(), ClientNetworkContentSocketHandler::RemoveCallback(), WindowDesc::WindowDesc(), and PoolBase::~PoolBase().

## ◆ Find() [2/2]

template<typename T, uint S>

T* SmallVector< T, S >::Find | ( | const T & | item | ) |
| inline

Search for the first occurrence of an item.

The '!=' operator of T is used for comparison.

Parameters

  item | Item to search for

Returns
  The position of the item, or End() when not present

Definition at line 181 of file smallvec_type.hpp.

## ◆ FindIndex()

template<typename T, uint S>

int SmallVector< T, S >::FindIndex | ( | const T & | item | ) | const
| inline

Search for the first occurrence of an item.

The '!=' operator of T is used for comparison.

Parameters

  item | Item to search for

Returns
  The position of the item, or -1 when not present

Definition at line 195 of file smallvec_type.hpp.

Referenced by BuildCargoTranslationMap(), CmdSetTimetableStart(), GetReverseRailTypeTranslation(), and NewGRFWindow::TagNameFilter().

## ◆ Get() [1/2]

template<typename T, uint S>

const T* SmallVector< T, S >::Get | ( | uint | index | ) | const
| inline

Get the pointer to item "number" (const)

Parameters

  index | the position of the item

Returns
  the pointer to the item

Definition at line 313 of file smallvec_type.hpp.

Referenced by AddNearbyStation(), BuildBridgeWindow::BridgeSpeedSorter(), ClientNetworkContentSocketHandler::Get(), GRFParameterInfo::GRFParameterInfo(), BuildBridgeWindow::UpdateWidgetSize(), and GRFParameterInfo::~GRFParameterInfo().

## ◆ Get() [2/2]

template<typename T, uint S>

T* SmallVector< T, S >::Get | ( | uint | index | ) |
| inline

Get the pointer to item "number".

Parameters

  index | the position of the item

Returns
  the pointer to the item

Definition at line 326 of file smallvec_type.hpp.

## ◆ Include()

template<typename T, uint S>

bool SmallVector< T, S >::Include | ( | const T & | item | ) |
| inline

Tests whether a item is present in the vector, and appends it to the end if not.

The '!=' operator of T is used for comparison.

Parameters

  item | Item to test for

Returns
  true iff the item is was already present

Definition at line 250 of file smallvec_type.hpp.

Referenced by ClientNetworkContentSocketHandler::AddCallback(), Hotkey::AddKeycode(), RefitWindow::BuildRefitList(), DeliverGoodsToIndustry(), GetBestFittingSubType(), NetworkContentDownloadStatusWindow::OnDownloadProgress(), ClientNetworkContentSocketHandler::ReverseLookupTreeDependency(), and UpdateTrainPowerProc().

## ◆ Length()

template<typename T, uint S>

uint SmallVector< T, S >::Length | ( |  | ) | const
| inline

Get the number of items in the list.

Returns
  The number of items in the list.

Definition at line 262 of file smallvec_type.hpp.

Referenced by NewGRFWindow::AddGRFToActive(), AddNearbyStation(), SmallVector< SmallPair< uint32, SmallPair< size_t, const void *> >, 16 >::Assign(), BuildCargoTranslationMap(), NetworkContentListWindow::BuildContentList(), StoryBookWindow::BuildDropDownList(), NetworkGameWindow::BuildGUINetworkGameList(), RefitWindow::BuildRefitList(), IndustryCargoesWindow::CalculatePositionInWidget(), CmdConvertRail(), CmdDepotMassAutoReplace(), CmdMassStartStopVehicle(), CmdSetTimetableStart(), DeliverGoodsToIndustry(), ClientNetworkContentSocketHandler::DownloadSelectedContent(), ClientNetworkContentSocketHandler::DownloadSelectedContentFallback(), ClientNetworkContentSocketHandler::DownloadSelectedContentHTTP(), NewGRFParametersWindow::DrawWidget(), CompanyStationsWindow::DrawWidget(), VehicleGroupWindow::DrawWidget(), BuildVehicleWindow::DrawWidget(), EngList_Sort(), BuildVehicleWindow::FilterEngineList(), GetBestFittingSubType(), GetBindAddresses(), GetCargoTranslation(), TextfileWindow::GetContentHeight(), GetGameStringPtr(), GetLinkGraphJobDesc(), RefitWindow::GetRefitOption(), GetReverseRailTypeTranslation(), MemoryDumper::GetSize(), StringFilter::GetState(), GetTrainDetailsWndVScroll(), GetUnitNumberDigits(), GRFConfig::GRFConfig(), GRFParameterInfo::GRFParameterInfo(), HandleParameterInfo(), NetworkHTTPSocketHandler::HTTPReceive(), StringFilter::IsEmpty(), IsGoodGRFConfigList(), ClientNetworkContentSocketHandler::Length(), NetworkUDPSocketHandler::Listen(), NeedRailTypeConversion(), TextfileWindow::NextString(), BuildBridgeWindow::OnClick(), CompanyStationsWindow::OnClick(), StoryBookWindow::OnClick(), TownDirectoryWindow::OnClick(), BuildVehicleWindow::OnClick(), IndustryDirectoryWindow::OnClick(), VehicleListWindow::OnClick(), SavePresetWindow::OnClick(), RefitWindow::OnInit(), StoryBookWindow::OnInvalidateData(), SpriteAlignerWindow::OnInvalidateData(), SelectStationWindow< T >::OnInvalidateData(), BuildBridgeWindow::OnKeyPress(), VehicleGroupWindow::OnMouseDrag(), VehicleGroupWindow::OnPaint(), BuildVehicleWindow::OnPaint(), VehicleListWindow::OnPaint(), NewGRFWindow::OnQueryTextFinished(), RefitWindow::RefreshScrollbar(), RestoreTrainBackup(), ClientNetworkContentSocketHandler::ReverseLookupTreeDependency(), SaveKeycodes(), SavePresetWindow::SavePresetWindow(), WindowDesc::SaveToConfig(), SendAllVehiclesToDepot(), NetworkUDPSocketHandler::SendPacket(), IcuStringIterator::SetCurPosition(), GRFConfig::SetParameterDefaults(), RefitWindow::SetSelection(), TextfileWindow::SetupScrollbars(), ShowMissingContentWindow(), LinkGraph::Size(), BuildBridgeWindow::SortBridgeList(), NewGRFWindow::TagNameFilter(), StoryBookWindow::UpdatePrevNextDisabledState(), BuildBridgeWindow::UpdateWidgetSize(), StoryBookWindow::UpdateWidgetSize(), TownDirectoryWindow::UpdateWidgetSize(), IndustryDirectoryWindow::UpdateWidgetSize(), NetworkClientListPopupWindow::UpdateWidgetSize(), SavePresetWindow::UpdateWidgetSize(), WhoCanServiceIndustry(), StringNameWriter::WriteStringID(), GRFConfig::~GRFConfig(), GRFParameterInfo::~GRFParameterInfo(), and PoolBase::~PoolBase().

## ◆ operator=() [1/2]

template<typename T, uint S>

SmallVector& SmallVector< T, S >::operator= | ( | const SmallVector< T, S > & | other | ) |
| inline

Assignment.

Parameters

  other | The other vector to assign.

Definition at line 61 of file smallvec_type.hpp.

## ◆ operator=() [2/2]

template<typename T, uint S>
template<uint X>

SmallVector& SmallVector< T, S >::operator= | ( | const SmallVector< T, X > & | other | ) |
| inline

Generic assignment.

Parameters

  other | The other vector to assign.

Definition at line 72 of file smallvec_type.hpp.

## ◆ operator[]() [1/2]

template<typename T, uint S>

const T& SmallVector< T, S >::operator[] | ( | uint | index | ) | const
| inline

Get item "number" (const)

Parameters

  index | the position of the item

Returns
  the item

Definition at line 339 of file smallvec_type.hpp.

## ◆ operator[]() [2/2]

template<typename T, uint S>

T& SmallVector< T, S >::operator[] | ( | uint | index | ) |
| inline

Get item "number".

Parameters

  index | the position of the item

Returns
  the item

Definition at line 351 of file smallvec_type.hpp.

## ◆ Resize()

template<typename T, uint S>

void SmallVector< T, S >::Resize | ( | uint | num_items | ) |
| inline

Set the size of the vector, effectively truncating items from the end or appending uninitialised ones.

Parameters

  num_items | Target size.

Definition at line 151 of file smallvec_type.hpp.

Referenced by RefitWindow::BuildRefitList(), and LinkGraphJob::Init().

The documentation for this class was generated from the following file:

- src/core/smallvec_type.hpp