Merge branch 'master' into jgrpp

# Conflicts:
#	projects/openttd_vs140.vcxproj.filters
#	projects/openttd_vs141.vcxproj.filters
#	projects/openttd_vs142.vcxproj.filters
#	src/base_consist.h
#	src/company_base.h
#	src/newgrf_config.cpp
#	src/newgrf_config.h
#	src/openttd.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/saveload/station_sl.cpp
#	src/settings.cpp
#	src/signs_base.h
#	src/string.cpp
#	src/string_func.h
#	src/table/misc_settings.ini
#	src/table/settings.h.preamble
#	src/town_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_cmd.cpp
#	src/video/cocoa/cocoa_v.mm
#	src/video/null_v.cpp
This commit is contained in:
Jonathan G Rennison
2020-05-21 20:19:57 +01:00
162 changed files with 2519 additions and 1448 deletions

View File

@@ -18,6 +18,7 @@
#include "../cargotype.h"
#include "../date_func.h"
#include "linkgraph_type.h"
#include <utility>
struct SaveLoad;
class LinkGraph;
@@ -189,20 +190,20 @@ public:
* to return something that implements operator->, but isn't a pointer
* from operator->. A fake pointer.
*/
class FakePointer : public SmallPair<NodeID, Tedge_wrapper> {
class FakePointer : public std::pair<NodeID, Tedge_wrapper> {
public:
/**
* Construct a fake pointer from a pair of NodeID and edge.
* @param pair Pair to be "pointed" to (in fact shallow-copied).
*/
FakePointer(const SmallPair<NodeID, Tedge_wrapper> &pair) : SmallPair<NodeID, Tedge_wrapper>(pair) {}
FakePointer(const std::pair<NodeID, Tedge_wrapper> &pair) : std::pair<NodeID, Tedge_wrapper>(pair) {}
/**
* Retrieve the pair by operator->.
* @return Pair being "pointed" to.
*/
SmallPair<NodeID, Tedge_wrapper> *operator->() { return this; }
std::pair<NodeID, Tedge_wrapper> *operator->() { return this; }
};
public:
@@ -267,9 +268,9 @@ public:
* Dereference with operator*.
* @return Pair of current target NodeID and edge object.
*/
SmallPair<NodeID, Tedge_wrapper> operator*() const
std::pair<NodeID, Tedge_wrapper> operator*() const
{
return SmallPair<NodeID, Tedge_wrapper>(this->current, Tedge_wrapper(this->base[this->current]));
return std::pair<NodeID, Tedge_wrapper>(this->current, Tedge_wrapper(this->base[this->current]));
}
/**

View File

@@ -173,9 +173,9 @@ public:
* @return Pair of the edge currently pointed to and the ID of its
* other end.
*/
SmallPair<NodeID, Edge> operator*() const
std::pair<NodeID, Edge> operator*() const
{
return SmallPair<NodeID, Edge>(this->current, Edge(this->base[this->current], this->base_anno[this->current]));
return std::pair<NodeID, Edge>(this->current, Edge(this->base[this->current], this->base_anno[this->current]));
}
/**