Replace TR1 headers with standard headers

Now that the C++11 standard is the default one, we can remove the TR1
headers and classes.
This commit is contained in:
Markus Mäkelä
2018-07-06 10:08:46 +03:00
parent 28ceb1bad8
commit 77a1417479
45 changed files with 100 additions and 112 deletions

View File

@ -39,8 +39,8 @@ struct AvroTable
avro_schema_t avro_schema; /*< Native Avro schema of the table */
};
typedef std::tr1::shared_ptr<AvroTable> SAvroTable;
typedef std::tr1::unordered_map<std::string, SAvroTable> AvroTables;
typedef std::shared_ptr<AvroTable> SAvroTable;
typedef std::unordered_map<std::string, SAvroTable> AvroTables;
// Converts replicated events into CDC events
class AvroConverter : public RowEventHandler

View File

@ -16,8 +16,8 @@
#include <cstdint>
#include <string>
#include <sstream>
#include <tr1/memory>
#include <tr1/unordered_map>
#include <memory>
#include <unordered_map>
#include <maxscale/pcre2.h>
#include <maxscale/service.h>
@ -72,7 +72,7 @@ struct Column
};
struct TableCreateEvent;
typedef std::tr1::shared_ptr<TableCreateEvent> STableCreateEvent;
typedef std::shared_ptr<TableCreateEvent> STableCreateEvent;
/** A CREATE TABLE abstraction */
struct TableCreateEvent
@ -151,12 +151,12 @@ struct TableMapEvent
Bytes column_metadata;
};
typedef std::tr1::shared_ptr<TableMapEvent> STableMapEvent;
typedef std::shared_ptr<TableMapEvent> STableMapEvent;
// Containers for the replication events
typedef std::tr1::unordered_map<std::string, STableCreateEvent> CreatedTables;
typedef std::tr1::unordered_map<std::string, STableMapEvent> MappedTables;
typedef std::tr1::unordered_map<uint64_t, STableMapEvent> ActiveMaps;
typedef std::unordered_map<std::string, STableCreateEvent> CreatedTables;
typedef std::unordered_map<std::string, STableMapEvent> MappedTables;
typedef std::unordered_map<uint64_t, STableMapEvent> ActiveMaps;
// Handler class for row based replication events
class RowEventHandler

View File

@ -14,14 +14,14 @@
#include "hintrouterdefs.hh"
#include <tr1/memory>
#include <memory>
#include <maxscale/dcb.h>
class Dcb
{
public:
typedef std::tr1::shared_ptr<DCB> SDCB;
typedef std::shared_ptr<DCB> SDCB;
explicit Dcb(DCB* pDcb);

View File

@ -15,7 +15,7 @@
#include "hintrouterdefs.hh"
#include <deque>
#include <tr1/unordered_map>
#include <unordered_map>
#include <vector>
#include <string>
@ -29,7 +29,7 @@ class HintRouter;
class HintRouterSession : public maxscale::RouterSession
{
public:
typedef std::tr1::unordered_map<string, Dcb> BackendMap; // All backends, indexed by name
typedef std::unordered_map<string, Dcb> BackendMap; // All backends, indexed by name
typedef std::vector<Dcb> BackendArray;
typedef std::vector<SERVER_REF*> RefArray;
typedef BackendMap::value_type MapElement;

View File

@ -20,8 +20,8 @@
#include <maxscale/cppdefs.hh>
#include <tr1/unordered_set>
#include <tr1/unordered_map>
#include <unordered_set>
#include <unordered_map>
#include <map>
#include <string>
@ -200,7 +200,7 @@ struct Config
bool optimistic_trx; /**< Enable optimistic transactions */
};
typedef std::tr1::shared_ptr<Config> SConfig;
typedef std::shared_ptr<Config> SConfig;
/**
* The statistics for this router instance

View File

@ -15,7 +15,7 @@
#include <maxscale/cppdefs.hh>
#include <map>
#include <tr1/memory>
#include <memory>
#include <maxscale/backend.hh>
#include <maxscale/modutil.h>
@ -35,7 +35,7 @@ enum reply_state_t
typedef std::map<uint32_t, uint32_t> BackendHandleMap; /** Internal ID to external ID */
class RWBackend;
typedef std::tr1::shared_ptr<RWBackend> SRWBackend;
typedef std::shared_ptr<RWBackend> SRWBackend;
typedef std::list<SRWBackend> SRWBackendList;
class RWBackend: public mxs::Backend

View File

@ -30,14 +30,14 @@
typedef std::map<uint32_t, uint32_t> ClientHandleMap; /** External ID to internal ID */
typedef std::tr1::unordered_set<std::string> TableSet;
typedef std::unordered_set<std::string> TableSet;
typedef std::map<uint64_t, uint8_t> ResponseMap;
/** List of slave responses that arrived before the master */
typedef std::list< std::pair<mxs::SRWBackend, uint8_t> > SlaveResponseList;
/** Map of COM_STMT_EXECUTE targets by internal ID */
typedef std::tr1::unordered_map<uint32_t, mxs::SRWBackend> ExecMap;
typedef std::unordered_map<uint32_t, mxs::SRWBackend> ExecMap;
/**
* The client session of a RWSplit instance

View File

@ -24,7 +24,7 @@
#include <list>
#include <set>
#include <string>
#include <tr1/memory>
#include <memory>
#include <maxscale/buffer.hh>
#include <maxscale/pcre2.h>
@ -128,7 +128,7 @@ private:
bool m_mapped; /**< Whether the backend has been mapped */
};
typedef std::tr1::shared_ptr<SRBackend> SSRBackend;
typedef std::shared_ptr<SRBackend> SSRBackend;
typedef std::list<SSRBackend> SSRBackendList;
}

View File

@ -14,7 +14,7 @@
#include <maxscale/cppdefs.hh>
#include <tr1/unordered_map>
#include <unordered_map>
#include <string>
#include <list>
@ -24,7 +24,7 @@
using namespace maxscale;
/** This contains the database to server mapping */
typedef std::tr1::unordered_map<std::string, SERVER*> ServerMap;
typedef std::unordered_map<std::string, SERVER*> ServerMap;
class Shard
{
@ -96,7 +96,7 @@ private:
time_t m_last_updated;
};
typedef std::tr1::unordered_map<std::string, Shard> ShardMap;
typedef std::unordered_map<std::string, Shard> ShardMap;
class ShardManager
{