Commit Graph

43 Commits

Author SHA1 Message Date
Henry Wilson ca2f33c6d0 Codechange: Replaced SmallVector::Erase() with std::vector::erase() 2019-03-26 20:15:57 +00:00
Henry Wilson 097328c3d7 Codechange: Replaced SmallVector::Get() const with std alternatives 2019-03-26 20:15:57 +00:00
Henry Wilson aa7ca7fe64 Codechange: Replaced SmallVector::Get(n) non-const with std::vector::data() + n 2019-03-26 20:15:57 +00:00
Henry Wilson bc7dcaffca Codechange: Removed SmallVector::Assign() 2019-03-26 20:15:57 +00:00
Henry Wilson 5795f66d2e Codechange: Replaced SmallVector::Contains() with std::find() pattern 2019-03-26 20:15:57 +00:00
Henry Wilson b1f5119d3a Codechange: Replaced SmallVector::ErasePreservingOrder(pos, count) with std::vector::erase() 2019-03-26 20:15:57 +00:00
Henry Wilson 9b5cc73f3e Codechange: Replaced SmallVector::ErasePreservingOrder(it, count) with std::vector::erase() 2019-03-26 20:15:57 +00:00
Henry Wilson 8460952240 Codechange: Replaced SmallVector::Find() const with suitable alternatives
The use of std::none_of in network/core/host.cpp is driven by the non-const
comparison operator use by NetworkAddress. A future commit should address
the const_casts in that class to ensure const-correctness.
2019-03-26 20:15:57 +00:00
Henry Wilson 81315939b9 Codechange: Replaced SmallVector::Find() non-const with std::find() 2019-03-26 20:15:57 +00:00
Henry Wilson f3938fdb83 Codechange: Replaced SmallVector::Reset() with std::vector::clear() + shrink_to_fit() 2019-03-26 20:15:57 +00:00
Henry Wilson bad2c2154b Codechange: Replaced SmallVector::Resize() with std::vector::resize() 2019-03-26 20:15:57 +00:00
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 2019-03-26 20:15:57 +00:00
Henry Wilson 56ae855dc2 Codechange: Removed SmallVector::operator[] 2019-03-26 20:15:57 +00:00
Henry Wilson 9cba6f7193 Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit() 2019-03-26 20:15:57 +00:00
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 2019-03-26 20:15:57 +00:00
Henry Wilson 4b349c0f90 Codechange: [core] Implement SmallVector using std::vector
The public and protected interface to SmallVector are unchanged
SmallVector now requires that items be default constructible
This isn't an issue since some contained items were previously created
uninitialized.

Temporary default constructors are added to the following structs
- SmallPair
- SmallStackItem
- GRFPresence

Where vector<bool> is required, transition immediately to std::vector
to avoid returning proxy object references.
2019-03-26 20:15:57 +00:00
Michael Lutz 4851feb102 Codechange: Add functions to insert and extract an element at a specific position in a SmallVec. 2018-04-15 20:49:29 +02:00
alberth bc08fe7c5f (svn r27641) -Codechange: Fold the _fios_items file list vector into its own class. 2016-09-04 12:50:22 +00:00
frosch 5cd5aca98c (svn r25043) -Change [FS#3764]: Only display subtypes in the refit GUI which are available for all selected vehicles. Also add a generic list item to refit while keeping the subtypes of individual vehicles. 2013-02-24 16:43:24 +00:00
frosch f9819c6645 (svn r24448) -Fix [FS#5255]: Copy constructor and assignment operator cannot be implicit template specialisations. (adf88) 2012-07-29 20:02:25 +00:00
frosch e1617a3d10 (svn r24275) -Codechange: Make SmallVector::FindIndex() const. 2012-05-25 20:52:11 +00:00
truebrain 1c9bec1999 (svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC) 2011-12-20 17:57:56 +00:00
truebrain 2ae87e7213 (svn r23634) -Add: support language files for GameScript (Rubidium) 2011-12-19 21:05:46 +00:00
rubidium fb5ecb9499 (svn r22411) -Document: another bunch of bits 2011-05-02 17:42:12 +00:00
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 2011-01-22 14:52:20 +00:00
yexo 0decc3e094 (svn r20731) -Fix (r20739): SmallVector did not have an assignment operator, causing invalid memory reads / double free 2010-09-03 23:04:02 +00:00
yexo a45b598bfc (svn r20729) -Fix [FS#4107]: assert when overbuilding object 2010-09-03 21:50:51 +00:00
alberth a825b4fa5f (svn r20266) -Doc: Mostly typo fixes, a few doxygen-related improvements. 2010-07-31 21:02:56 +00:00
alberth 51e67a40e0 (svn r19909) -Doc: Typo fixes, small doxygen improvements. 2010-05-30 13:05:36 +00:00
rubidium d818c7c7b1 (svn r18996) -Fix (r18993, r18994): MSVC 64 bits had somethings to complain about 2010-02-03 21:45:48 +00:00
rubidium c75f19f40b (svn r18993) -Codechange: allow allocating multiple items in a SmallVector with one call. 2010-02-03 17:25:56 +00:00
smatz ce08aebde7 (svn r18640) -Fix (r18633): don't assert when accessing first invalid item, it's used quite often in the code
-Revert (r18637): it's not needed any more
2009-12-26 13:49:14 +00:00
smatz a7be7ebe80 (svn r18633) -Codechange: fortify SmallVector a bit more 2009-12-25 23:10:20 +00:00
frosch 2d9c54c9a8 (svn r17541) -Feature: Filtering in Add-NewGRF dialog. 2009-09-14 20:59:46 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium 89d0eca6b7 (svn r15931) -Codechange: let the host and ban lists use of SmallVector. 2009-04-03 12:49:58 +00:00
peter1138 e73a4e490c (svn r15447) -Codechange: void functions don't tend to return true if and only if anyway 2009-02-11 07:17:39 +00:00
rubidium 3a13b75e37 (svn r15126) -Feature: downloading content from a central server (content.openttd.org) where authors can upload they NewGRFS/AI etc. This should make joining servers that use only NewGRFs that are distributed via this system easier as the players can download the NewGRFs from in the game. It should also make it easier to see whether there are updates for NewGRFs and make the necessary updates. 2009-01-17 16:53:32 +00:00
frosch 5ea2dc97fd (svn r14704) -Codechange: Add set capabilities to SmallVector. 2008-12-20 17:09:44 +00:00
smatz 3cd2957544 (svn r14669) -Codechange: use SmallVector instead of std::list at one place 2008-12-13 15:59:25 +00:00
peter1138 6e0af9fdfe (svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file. 2008-07-22 14:17:29 +00:00
skidd13 640e547886 (svn r13606) -Codechange: use "static FORCEINLINE" where possible as default for core functions (big functions use just inline instead) 2008-06-22 15:21:51 +00:00
skidd13 2f65d35ead (svn r13575) -Codechange: Move small vector to core since it fits better in there
-Codechange: convert smallvector from struct to class
2008-06-19 10:19:02 +00:00
Renamed from src/misc/smallvec.h (Browse further)