diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-03-03 17:30:09 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-26 20:15:57 +0000 |
commit | c01a2e2a81d8e7bcd47d46292ed0b7d452081c31 (patch) | |
tree | b38441ec8469136a6a2252f8c856d22f14ee689e /src/network | |
parent | 6570f7989f5c1fc5a1276505a8e6efce7838efd9 (diff) | |
download | openttd-c01a2e2a81d8e7bcd47d46292ed0b7d452081c31.tar.xz |
Codechange: Removed SmallVector completely
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/core/address.h | 2 | ||||
-rw-r--r-- | src/network/core/tcp_connect.cpp | 2 | ||||
-rw-r--r-- | src/network/core/tcp_http.cpp | 2 | ||||
-rw-r--r-- | src/network/network_content.h | 10 | ||||
-rw-r--r-- | src/network/network_content_gui.cpp | 2 | ||||
-rw-r--r-- | src/network/network_gui.cpp | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/src/network/core/address.h b/src/network/core/address.h index b5c78c79b..f6d7870bf 100644 --- a/src/network/core/address.h +++ b/src/network/core/address.h @@ -18,7 +18,7 @@ #include "../../core/smallmap_type.hpp" class NetworkAddress; -typedef SmallVector<NetworkAddress, 4> NetworkAddressList; ///< Type for a list of addresses. +typedef std::vector<NetworkAddress> NetworkAddressList; ///< Type for a list of addresses. typedef SmallMap<NetworkAddress, SOCKET, 4> SocketList; ///< Type for a mapping between address and socket. /** diff --git a/src/network/core/tcp_connect.cpp b/src/network/core/tcp_connect.cpp index d699cf60d..d76042821 100644 --- a/src/network/core/tcp_connect.cpp +++ b/src/network/core/tcp_connect.cpp @@ -19,7 +19,7 @@ #include "../../safeguards.h" /** List of connections that are currently being created */ -static SmallVector<TCPConnecter *, 1> _tcp_connecters; +static std::vector<TCPConnecter *> _tcp_connecters; /** * Create a new connecter for the given address diff --git a/src/network/core/tcp_http.cpp b/src/network/core/tcp_http.cpp index cec77fb14..3e9cc8141 100644 --- a/src/network/core/tcp_http.cpp +++ b/src/network/core/tcp_http.cpp @@ -21,7 +21,7 @@ #include "../../safeguards.h" /** List of open HTTP connections. */ -static SmallVector<NetworkHTTPSocketHandler *, 1> _http_connections; +static std::vector<NetworkHTTPSocketHandler *> _http_connections; /** * Start the querying diff --git a/src/network/network_content.h b/src/network/network_content.h index 26300c4ca..e62c921e6 100644 --- a/src/network/network_content.h +++ b/src/network/network_content.h @@ -16,9 +16,9 @@ #include "core/tcp_http.h" /** Vector with content info */ -typedef SmallVector<ContentInfo *, 16> ContentVector; +typedef std::vector<ContentInfo *> ContentVector; /** Vector with constant content info */ -typedef SmallVector<const ContentInfo *, 16> ConstContentVector; +typedef std::vector<const ContentInfo *> ConstContentVector; /** Iterator for the content vector */ typedef ContentInfo **ContentIterator; @@ -66,11 +66,11 @@ struct ContentCallback { */ class ClientNetworkContentSocketHandler : public NetworkContentSocketHandler, ContentCallback, HTTPCallback { protected: - typedef SmallVector<ContentID, 4> ContentIDList; ///< List of content IDs to (possibly) select. - SmallVector<ContentCallback *, 2> callbacks; ///< Callbacks to notify "the world" + typedef std::vector<ContentID> ContentIDList; ///< List of content IDs to (possibly) select. + std::vector<ContentCallback *> callbacks; ///< Callbacks to notify "the world" ContentIDList requested; ///< ContentIDs we already requested (so we don't do it again) ContentVector infos; ///< All content info we received - SmallVector<char, 1024> http_response; ///< The HTTP response to the requests we've been doing + std::vector<char> http_response; ///< The HTTP response to the requests we've been doing int http_response_index; ///< Where we are, in the response, with handling it FILE *curFile; ///< Currently downloaded file diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index 9ea56d747..09168185a 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -160,7 +160,7 @@ void BaseNetworkContentDownloadStatusWindow::OnDownloadProgress(const ContentInf /** Window for showing the download status of content */ struct NetworkContentDownloadStatusWindow : public BaseNetworkContentDownloadStatusWindow { private: - SmallVector<ContentType, 4> receivedTypes; ///< Types we received so we can update their cache + std::vector<ContentType> receivedTypes; ///< Types we received so we can update their cache public: /** diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index a8dd2aa52..b35e91528 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -1728,7 +1728,7 @@ struct NetworkClientListPopupWindow : Window { uint sel_index; ClientID client_id; Point desired_location; - SmallVector<ClientListAction, 2> actions; ///< Actions to execute + std::vector<ClientListAction> actions; ///< Actions to execute /** * Add an action to the list of actions to execute. |