glx
26aa3b8623
Remove: grow() helper function
2019-05-04 19:50:53 +01:00
Michael Lutz
8b1880187a
Remove: AutoFreeSmallVector.
...
The last use was for storing a list of memory blocks. As the way these lists are accessed is very
specific, it is easier to just write an explicit destructor instead of trying to exactly match the behaviour.
2019-04-09 22:45:15 +02:00
Michael Lutz
e804173595
Codechange: If something is a vector of strings, use a vector of strings instead of an AutoFreeSmallVector.
2019-04-09 22:45:15 +02:00
Michael Lutz
c7b9987d08
Codechange: Switch DropDownList to directly use std::vector, thus making AutoDeleteSmallVector obsolete.
...
DropDownListItem are strongly managed using std::unique_ptr to ensure leak-free handling. Appropriate use
of move-semantics make intent a lot clearer than parameter comments and allows the compiler to generate
copy-free code for most situations.
2019-04-09 22:45:15 +02:00
Henry Wilson
03ca3190c9
Codechange: Use range-based for-loop in Auto[Free|Delete]SmallVector
2019-03-26 20:15:57 +00:00
Henry Wilson
cc62f4163f
Cleanup: Remove unused size template parameters from SmallMap and Auto[Free|Delete]SmallVector
2019-03-26 20:15:57 +00:00
Henry Wilson
c01a2e2a81
Codechange: Removed SmallVector completely
2019-03-26 20:15:57 +00:00
Henry Wilson
6570f7989f
Codechange: Declare SmallVector as an alias for std::vector
2019-03-26 20:15:57 +00:00
Henry Wilson
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
2019-03-26 20:15:57 +00:00
Henry Wilson
297fd3dda3
Codechange: Replaced SmallVector::Include() with include()
2019-03-26 20:15:57 +00:00
Henry Wilson
2bc2de9034
Codechange: Replaced SmallVector::Find() with std::find()
2019-03-26 20:15:57 +00:00
Henry Wilson
e0c58bf5ee
Codechange: Removed SmallVector::Insert()
2019-03-26 20:15:57 +00:00
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
2019-03-26 20:15:57 +00:00
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