OpenTTD: SmallVector< T, S > Class Template Reference

OpenTTD

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

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.
template<uint X>
| SmallVector (const SmallVector< T, X > &other)
| Generic copy constructor.
SmallVector & | operator= (const SmallVector &other)
| Assignment.
template<uint X>
SmallVector & | operator= (const SmallVector< T, X > &other)
| Generic assignment.
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.
void | Resize (uint num_items)
| Set the size of the vector, effectively truncating items from the end or appending uninitialised ones.
const T * | Find (const T &item) const
| Search for the first occurrence of an item.
T * | Find (const T &item)
| Search for the first occurrence of an item.
int | FindIndex (const T &item) const
| Search for the first occurrence of an item.
bool | Contains (const T &item) const
| Tests whether a item is present in the vector.
void | Erase (T *item)
| Removes given item from this vector.
void | ErasePreservingOrder (uint pos, uint count=1)
| Remove items from the vector while preserving the order of other items.
bool | Include (const T &item)
| Tests whether a item is present in the vector, and appends it to the end if not.
uint | Length () const
| Get the number of items in the list.
const T * | Begin () const
| Get the pointer to the first item (const)
T * | Begin ()
| Get the pointer to the first item.
const T * | End () const
| Get the pointer behind the last valid item (const)
T * | End ()
| Get the pointer behind the last valid item.
const T * | Get (uint index) const
| Get the pointer to item "number" (const)
T * | Get (uint index)
| Get the pointer to item "number".
const T & | operator[] (uint index) const
| Get item "number" (const)
T & | operator[] (uint index)
| Get item "number".

## 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

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.

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

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 OutputStore::Add(), NetworkClientListPopupWindow::AddAction(), AddChildSpriteScreen(), FiosFileScanner::AddFile(), LanguageScanner::AddFile(), AddNearbyStation(), LinkGraph::AddNode(), PacketReader::AddPacket(), AddSortableSpriteToDraw(), AddStringForMapping(), AddTileSpriteToDraw(), AfterLoadGame(), AllocateSound(), AlterVehicleListOrder(), SmallVector< RefitOption, 32 >::Assign(), BaseVehicleListWindow::BuildActionDropdownList(), BuildAirportWindow::BuildAirportClassDropDown(), CompanyLeagueWindow::BuildCompanyList(), NetworkContentListWindow::BuildContentList(), BuildDepotVehicleList(), GameOptionsWindow::BuildDropDownList(), StoryBookWindow::BuildDropDownList(), VehicleGroupWindow::BuildGroupList(), NetworkGameWindow::BuildGUINetworkGameList(), RefitWindow::BuildRefitList(), IndustryDirectoryWindow::BuildSortIndustriesList(), CompanyStationsWindow::BuildStationsList(), StoryBookWindow::BuildStoryPageElementList(), StoryBookWindow::BuildStoryPageList(), CheckCaches(), CheckFlatLandRailStation(), CmdBuildRailStation(), CmdConvertRail(), CmdSetTimetableStart(), CommitVehicleListOrderChanges(), GameStrings::Compile(), IndustryCargoesWindow::ComputeCargoDisplay(), IndustryCargoesWindow::ComputeIndustryDisplay(), ClientNetworkContentSocketHandler::DownloadContentInfo(), ClientNetworkContentSocketHandler::DownloadSelectedContent(), FindIndustryToDeliver(), FindStationsNearby(), FiosGetFileList(), ReplaceVehicleWindow::GenerateReplaceVehList(), GenerateVehicleSortList(), GetBindAddresses(), GetCargoSummaryOfArticulatedVehicle(), Layouter::GetFont(), GetGRFPresetList(), GetLanguageList(), GetLinkGraphJobDesc(), GetNewEngine(), GetRailTypeDropDownList(), GlobalVarChangeInfo(), GRFConfig::GRFConfig(), HandleParameterInfo(), SmallVector< RefitOption, 32 >::Include(), IniLoadSettingList(), InitNewGRFFile(), Window::InvalidateData(), TextfileWindow::LoadTextfile(), LoadTranslations(), MakeTrainBackup(), NetworkFindBroadcastIPsInternal(), NetworkHTTPSocketHandler::NetworkHTTPSocketHandler(), NetworkServerKickOrBanIP(), NetworkUDPSocketHandler::NetworkUDPSocketHandler(), FallbackParagraphLayout::NextLine(), NewGRFParametersWindow::OnClick(), AISettingsWindow::OnClick(), NewGRFWindow::OnClick(), OrdersWindow::OnClick(), GameSettingsWindow::OnClick(), IndustryCargoesWindow::OnClick(), AfterNewGRFScan::OnNewGRFsScanned(), ClientNetworkContentSocketHandler::OnReceiveData(), PoolBase::PoolBase(), PopupMainCompanyToolbMenu(), PopupMainToolbMenu(), NewGRFSpriteLayout::PrepareLayout(), ReadRawLanguageStrings(), RefitVehicle(), ClientNetworkContentSocketHandler::RequestContentList(), ClientNetworkContentSocketHandler::ReverseLookupDependency(), ClientNetworkContentSocketHandler::ReverseLookupTreeDependency(), StringFilter::SetFilterTerm(), ShowBuildBridgeWindow(), SetDateWindow::ShowDateDropDown(), ShowDropDownMenu(), ShowMissingContentWindow(), StationChangeInfo(), TCPConnecter::TCPConnecter(), ToolbarOptionsClick(), WindowDesc::WindowDesc(), TranslationWriter::Write(), MemoryDumper::WriteByte(), and StringNameWriter::WriteStringID().

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 270 of file smallvec_type.hpp.

Referenced by TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::AcceptClient(), AddCargoDelivery(), FiosFileScanner::AddFile(), StringFilter::AddLine(), AfterLoadGame(), AfterLoadGRFs(), SmallVector< RefitOption, 32 >::Assign(), ClientNetworkContentSocketHandler::Begin(), GameOptionsWindow::BuildDropDownList(), StoryBookWindow::BuildDropDownList(), TCPConnecter::CheckCallbacks(), ClientNetworkContentSocketHandler::CheckDependencyState(), CheckSubsidised(), PoolBase::Clean(), LoadCheckData::Clear(), ClientNetworkContentSocketHandler::Clear(), NetworkUDPSocketHandler::Close(), TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::CloseListeners(), CmdConvertRail(), CmdRemoveFromRailStation(), CmdSetTimetableStart(), CommitVehicleListOrderChanges(), GameStrings::Compile(), ClientNetworkContentSocketHandler::DownloadSelectedContent(), ClientNetworkContentSocketHandler::DownloadSelectedContentFallback(), ClientNetworkContentSocketHandler::DownloadSelectedContentHTTP(), NetworkContentListWindow::DrawDetails(), DrawString(), DrawStringMultiLine(), DropdownWindow::DrawWidget(), SaveLoadWindow::DrawWidget(), StoryBookWindow::DrawWidget(), NetworkClientListPopupWindow::DrawWidget(), DropdownWindow::DropdownWindow(), EngList_Sort(), SmallVector< RefitOption, 32 >::Erase(), NetworkContentListWindow::FilterContentList(), FinaliseAirportsArray(), FinaliseHouseArray(), FinaliseIndustriesArray(), FinaliseObjectsArray(), FinalisePriceBaseMultipliers(), GRFConfig::FinalizeParameterInfo(), SmallVector< RefitOption, 32 >::Find(), FindClearedObject(), SmallVector< RefitOption, 32 >::FindIndex(), FindScenario(), FiosGetFileList(), GetBindAddresses(), ClientNetworkContentSocketHandler::GetContent(), StoryBookWindow::GetContentHeight(), BaseSet< GraphicsSet, MAX_GFT, true >::GetDescription(), DropdownWindow::GetDropDownItem(), GetFileByFilename(), GetFileByGRFID(), GetLanguage(), NewGRFSpriteLayout::GetLayout(), LanguageMap::GetMapping(), GetRailTypeDropDownList(), LanguageMap::GetReverseMapping(), StoryBookWindow::GetSelPageNum(), GetUnitNumberDigits(), HouseScopeResolver::GetVariable(), NetworkHTTPSocketHandler::HTTPReceive(), IniSaveSettingList(), InitializeLanguagePacks(), StoryBookWindow::IsFirstPageSelected(), TCPConnecter::KillAll(), NetworkUDPSocketHandler::Listen(), WindowDesc::LoadFromConfig(), LoadUnloadStation(), MoveWaypointsToBaseStations(), NetworkFindBroadcastIPs(), NetworkServerKickOrBanIP(), NetworkUDPBroadCast(), NetworkUDPSocketHandler::NetworkUDPSocketHandler(), FallbackParagraphLayout::NextLine(), StoryBookWindow::OnClick(), NetworkContentListWindow::OnInvalidateData(), ClientNetworkContentSocketHandler::OnReceiveData(), NetworkContentListWindow::OpenExternalSearch(), NewGRFSpriteLayout::PrepareLayout(), NewGRFSpriteLayout::ProcessRegisters(), Window::ProcessScheduledInvalidations(), TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::Receive(), NetworkUDPSocketHandler::ReceivePackets(), ReconsiderGameScriptLanguage(), RefitVehicle(), RegisterGameTranslation(), RemoveFromRailBaseStation(), ClientNetworkContentSocketHandler::RequestContentList(), PacketReader::Reset(), ResetCustomAirports(), ResetCustomHouses(), ResetCustomIndustries(), ResetCustomObjects(), ResetCustomStations(), ResetNewGRF(), StringFilter::ResetState(), RestoreTrainBackup(), ClientNetworkContentSocketHandler::ReverseLookupDependency(), ClientNetworkContentSocketHandler::ReverseLookupTreeDependency(), WindowDesc::SaveToConfig(), ClientNetworkContentSocketHandler::SelectAll(), StoryBookWindow::SelectNextPage(), StoryBookWindow::SelectPrevPage(), ClientNetworkContentSocketHandler::SelectUpgrade(), NetworkUDPSocketHandler::SendPacket(), SetupEngines(), ShowDropDownListAt(), ShowNetworkContentListWindow(), NetworkContentListWindow::SortContentList(), StationChangeInfo(), ClientNetworkContentSocketHandler::UnselectAll(), UpdateWaypointOrder(), GameOptionsWindow::UpdateWidgetSize(), NetworkClientListPopupWindow::UpdateWidgetSize(), ViewportDrawBoundingBoxes(), ViewportSortParentSprites(), OutputStore::Write(), LanguageWriter::WriteLang(), BaseSet< GraphicsSet, MAX_GFT, true >::~BaseSet(), ClientNetworkContentSocketHandler::~ClientNetworkContentSocketHandler(), FreeTypeFontCache::~FreeTypeFontCache(), NetworkContentDownloadStatusWindow::~NetworkContentDownloadStatusWindow(), and UnmappedChoiceList::~UnmappedChoiceList().

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 280 of file smallvec_type.hpp.

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 AddNearbyStation(), RefitWindow::BuildRefitList(), ClientNetworkContentSocketHandler::DownloadContentInfo(), RefitWindow::DrawWidget(), BuildVehicleWindow::FilterEngineList(), FindIndustryToDeliver(), GetBestFittingSubType(), GetRailTypeByLabel(), SmallVector< RefitOption, 32 >::Include(), NetworkFindBroadcastIPsInternal(), RefitVehicle(), and WhoCanServiceIndustry().

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 290 of file smallvec_type.hpp.

Referenced by TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::AcceptClient(), AddCargoDelivery(), AddCombinedSprite(), FiosFileScanner::AddFile(), StringFilter::AddLine(), AfterLoadGame(), AfterLoadGRFs(), StoryBookWindow::BuildDropDownList(), ChangeGRFParamValueNames(), TCPConnecter::CheckCallbacks(), ClientNetworkContentSocketHandler::CheckDependencyState(), CheckSubsidised(), PoolBase::Clean(), LoadCheckData::Clear(), ClientNetworkContentSocketHandler::Clear(), NetworkUDPSocketHandler::Close(), TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::CloseListeners(), CmdConvertRail(), CmdRemoveFromRailStation(), CmdSetTimetableStart(), CommitVehicleListOrderChanges(), GameStrings::Compile(), SmallVector< RefitOption, 32 >::Contains(), ClientNetworkContentSocketHandler::DownloadSelectedContent(), ClientNetworkContentSocketHandler::DownloadSelectedContentHTTP(), NetworkContentListWindow::DrawDetails(), NetworkContentListWindow::DrawMatrix(), DrawStringMultiLine(), DropdownWindow::DrawWidget(), SaveLoadWindow::DrawWidget(), StoryBookWindow::DrawWidget(), NetworkClientListPopupWindow::DrawWidget(), DropdownWindow::DropdownWindow(), ClientNetworkContentSocketHandler::End(), SmallVector< RefitOption, 32 >::Erase(), FallbackParagraphLayout::FallbackParagraphLayout(), NetworkContentListWindow::FilterContentList(), FinaliseAirportsArray(), FinaliseHouseArray(), FinaliseIndustriesArray(), FinaliseObjectsArray(), FinalisePriceBaseMultipliers(), GRFConfig::FinalizeParameterInfo(), SmallVector< RefitOption, 32 >::Find(), FindClearedObject(), SmallVector< RefitOption, 32 >::FindIndex(), FindScenario(), GamelogPrint(), ReplaceVehicleWindow::GenerateLists(), GetBindAddresses(), GetCargoSummaryOfArticulatedVehicle(), ClientNetworkContentSocketHandler::GetContent(), StoryBookWindow::GetContentHeight(), BaseSet< GraphicsSet, MAX_GFT, true >::GetDescription(), DropdownWindow::GetDropDownItem(), GetFileByFilename(), GetFileByGRFID(), FreeTypeFontCache::GetFontTable(), GetLanguage(), LanguageMap::GetMapping(), Window::GetQueryString(), LanguageMap::GetReverseMapping(), StoryBookWindow::GetSelPageNum(), GetUnitNumberDigits(), HouseScopeResolver::GetVariable(), NetworkHTTPSocketHandler::HTTPReceive(), IniSaveSettingList(), InitializeLanguagePacks(), StoryBookWindow::IsLastPageSelected(), TCPConnecter::KillAll(), NetworkUDPSocketHandler::Listen(), WindowDesc::LoadFromConfig(), LoadUnloadStation(), MoveWaypointsToBaseStations(), NetworkFindBroadcastIPs(), NetworkServerKickOrBanIP(), NetworkUDPBroadCast(), NetworkUDPSocketHandler::NetworkUDPSocketHandler(), FallbackParagraphLayout::NextLine(), StoryBookWindow::OnClick(), NetworkContentListWindow::OnInvalidateData(), NetworkContentListWindow::OpenExternalSearch(), Window::ProcessScheduledInvalidations(), TCPListenHandler< ServerNetworkGameSocketHandler, PACKET_SERVER_FULL, PACKET_SERVER_BANNED >::Receive(), NetworkUDPSocketHandler::ReceivePackets(), ReconsiderGameScriptLanguage(), RefitVehicle(), RegisterGameTranslation(), RemoveFromRailBaseStation(), ClientNetworkContentSocketHandler::RequestContentList(), ResetCustomAirports(), ResetCustomHouses(), ResetCustomIndustries(), ResetCustomObjects(), ResetCustomStations(), Layouter::ResetFontCache(), ResetNewGRF(), StringFilter::ResetState(), RestoreTrainBackup(), ClientNetworkContentSocketHandler::ReverseLookupDependency(), ClientNetworkContentSocketHandler::ReverseLookupTreeDependency(), WindowDesc::SaveToConfig(), ClientNetworkContentSocketHandler::SelectAll(), StoryBookWindow::SelectNextPage(), StoryBookWindow::SelectPrevPage(), ClientNetworkContentSocketHandler::SelectUpgrade(), NetworkUDPSocketHandler::SendPacket(), SpriteAlignerWindow::SetStringParameters(), SetupEngines(), ShowDropDownListAt(), ShowNetworkContentListWindow(), NetworkContentListWindow::SortContentList(), ClientNetworkContentSocketHandler::UnselectAll(), UpdateWaypointOrder(), GameOptionsWindow::UpdateWidgetSize(), NetworkClientListPopupWindow::UpdateWidgetSize(), ViewportDrawBoundingBoxes(), ViewportSortParentSprites(), OutputStore::Write(), BaseSet< GraphicsSet, MAX_GFT, true >::~BaseSet(), ClientNetworkContentSocketHandler::~ClientNetworkContentSocketHandler(), FreeTypeFontCache::~FreeTypeFontCache(), NetworkContentDownloadStatusWindow::~NetworkContentDownloadStatusWindow(), and UnmappedChoiceList::~UnmappedChoiceList().

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 300 of file smallvec_type.hpp.

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.

Reimplemented in SmallMap< int, QueryString * >, SmallMap< int, Font * >, and SmallMap< NetworkAddress, SOCKET, 4 >.

Definition at line 223 of file smallvec_type.hpp.

Referenced by AddNearbyStation(), TCPConnecter::CheckCallbacks(), NetworkHTTPSocketHandler::HTTPReceive(), ClientNetworkContentSocketHandler::RemoveCallback(), LinkGraph::RemoveNode(), and PoolBase::~PoolBase().

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().

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 SmallVector< RefitOption, 32 >::Contains(), GetCargoSummaryOfArticulatedVehicle(), ClientNetworkContentSocketHandler::RemoveCallback(), and PoolBase::~PoolBase().

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.

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(), CommitVehicleListOrderChanges(), FinalisePriceBaseMultipliers(), and GetReverseRailTypeTranslation().

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 311 of file smallvec_type.hpp.

Referenced by AddNearbyStation(), CheckCaches(), CommitVehicleListOrderChanges(), NetworkContentListWindow::DrawMatrix(), BuildBridgeWindow::DrawWidget(), EnginePreSort(), EngList_SortPartial(), FiosGetFileList(), ClientNetworkContentSocketHandler::Get(), GetNewEngine(), GRFParameterInfo::GRFParameterInfo(), LinkGraph::RemoveNode(), BuildBridgeWindow::UpdateWidgetSize(), and GRFParameterInfo::~GRFParameterInfo().

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 324 of file smallvec_type.hpp.

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(), CheckSubsidised(), DeliverGoodsToIndustry(), FindStationsAroundTiles(), GetBestFittingSubType(), GfxBlitter(), RemoveFromRailBaseStation(), ClientNetworkContentSocketHandler::ReverseLookupTreeDependency(), and UpdateTrainPowerProc().

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.

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.

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 337 of file smallvec_type.hpp.

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 349 of file smallvec_type.hpp.

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(), LinkGraphJob::Init(), and LinkGraph::Init().

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

- src/core/smallvec_type.hpp