Codechange: Removed SmallVector completely

This commit is contained in:
Henry Wilson
2019-03-03 17:30:09 +00:00
committed by PeterN
parent 6570f7989f
commit c01a2e2a81
69 changed files with 109 additions and 127 deletions

View File

@@ -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.
/**

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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:
/**

View File

@@ -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.