summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2019-04-29Remove: (Simple)TinyEnumTCharles Pigott
2019-04-21Codechange: Use std::underlying_type for DECLARE_POSTFIX_INCREMENT.peter1138
2019-04-21Fix: Replace int with std::underlying_type in DECLARE_ENUM_AS_BIT_SET.peter1138
This fixes 64 bit uses of this macro.
2019-04-18Cleanup: remove core/sort_func.hpp as it's not used anymoreglx
2019-04-18Codechange: use std::vector for _resolutionsglx
2019-04-15Codechange: No need for AutoFreePtr if there's std::unique_ptr.Michael Lutz
2019-04-15Codechange: Replace SmallStackSafeStackAlloc with std::array.Michael Lutz
The only port that ever used it to make heap allocations instead of stack ones was the NDS port, which got thrown out some time ago.
2019-04-13Fix 801cbea9c: operator< is not always the best ideaglx
Also removes unused and anyway broken SmallMap::SortByKey() function.
2019-04-13Codechange: use std::sort() for all std::vector typesglx
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-04-09Remove: AutoFreeSmallVector.Michael Lutz
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-09Codechange: If something is a vector of strings, use a vector of strings ↵Michael Lutz
instead of an AutoFreeSmallVector.
2019-04-09Codechange: Switch DropDownList to directly use std::vector, thus making ↵Michael Lutz
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-06Codechange: Replace custom mutex code with C++11 mutex'es.Michael Lutz
A conforming compiler with a valid <mutex>-header is expected. Most parts of the code assume that locking a mutex will never fail unexpectedly, which is generally true on all common platforms that don't just pretend to be C++11. The use of condition variables in driver code is checked.
2019-03-28Fix #7165: Const overload SmallMap::Contains(key) compared wrong types.Michael Lutz
Const and non-const Find() have different return types.
2019-03-28Fix #7165: SmallMap::Erase(key) does not work correctlystormcone
2019-03-28Fix: MSVC warnings (#7423)glx22
2019-03-27Fix #7421: Don't (directly) dereference std::vector::end() in SmallMapCharles Pigott
2019-03-26Codechange: Use range-based for-loop in Auto[Free|Delete]SmallVectorHenry Wilson
2019-03-26Cleanup: Remove unused size template parameters from SmallMap and ↵Henry Wilson
Auto[Free|Delete]SmallVector
2019-03-26Codechange: Removed SmallVector completelyHenry Wilson
2019-03-26Codechange: Declare SmallVector as an alias for std::vectorHenry Wilson
2019-03-26Codechange: Replaced SmallVector::[Begin|End]() with std alternativesHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Include() with include()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Find() with std::find()Henry Wilson
2019-03-26Codechange: Removed SmallVector::Insert()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Append() with ↵Henry Wilson
std::vector::[push|emplace]_back()
2019-03-26Codechange: Replaced SmallVector::Erase() with std::vector::erase()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Get() const with std alternativesHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Get(n) non-const with std::vector::data() + nHenry Wilson
2019-03-26Codechange: Removed SmallVector::Assign()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Contains() with std::find() patternHenry Wilson
2019-03-26Codechange: Replaced SmallVector::ErasePreservingOrder(pos, count) with ↵Henry Wilson
std::vector::erase()
2019-03-26Codechange: Replaced SmallVector::ErasePreservingOrder(it, count) with ↵Henry Wilson
std::vector::erase()
2019-03-26Codechange: Replaced SmallVector::Find() const with suitable alternativesHenry Wilson
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-26Codechange: Replaced SmallVector::Find() non-const with std::find()Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Reset() with std::vector::clear() + ↵Henry Wilson
shrink_to_fit()
2019-03-26Codechange: Replaced SmallVector::Resize() with std::vector::resize()Henry Wilson
2019-03-26Codechange: Replace SmallVector::Length() with std::vector::size()Henry Wilson
2019-03-26Codechange: Removed SmallVector::operator[]Henry Wilson
2019-03-26Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit()Henry Wilson
2019-03-26Codechange: Replace SmallVector::Clear() with std::vector::clear()Henry Wilson
2019-03-26Codechange: [core] Implement SmallVector using std::vectorHenry Wilson
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-19Remove: DOS supportPatric Stout
In 10 years there was no active development on DOS. Although it turned out to still work, the FPS was very bad. There is little interest in the current community to look into this. Further more, we like to switch to c++11 functions for threads, which are not implemented by DJGPP, the only current compiler for DOS. Additionally, DOS is the only platform which does not support networking. It is the reason we have tons of #ifdefs to support disabling networking. By removing DOS support, we can both use c++11 functions for threads, and remove all the code related to disabling network. Sadly, this means we have to see DOS go. Of course, if you feel up for the task, simply revert this commit, and implement stub c++11 functions for threads and stub functions for networking. We are more than happy to accept such Pull Request.
2019-03-09Codechange: Add a k-d tree generic data structureNiels Martin Hansen
2019-03-05Fix: warnings when compiling with DJGPPPatric Stout
This was most likely broken for months, if not years.
2019-03-05Fix: warnings when compiling for a recent version of HaikuPatric Stout
This might break older Haiku versions, but it is hard to tell.
2019-03-05Codechange: removed some left-behind __NDS__ referencesPatric Stout
2019-03-05Remove: MorphOS / AmigaOS supportPatric Stout
In 10 years there is no commit to change how MorphOS works, and we have no active maintainer for it. It is unlikely it works in its current state (but not impossible). With the arrival of SDL2 (and removal of SDL), MorphOS is no longer support. There is an SDL2 port for MorphOS, but it is not maintained by upstream SDL2, and nobody can currently test it out. If anyone wants to re-add MorphOS, please do (revert this patch, fix the problems, and create a Pull Request). If you need any help doing so, let us know! It is not that we don't like MorphOS, it is that we don't have anyone fixing the problems :(
2019-02-13Change: Use SlErrorCorrupt() on pool index error when loading a savegame, ↵PeterN
instead of terminating. (#7219)