clang-tidy: modernize-use-using (NFC)

Excludes C-compatible headers
This commit is contained in:
Peter Johnson
2020-12-27 22:52:53 -08:00
parent 885f5a9781
commit 4cc0706b06
12 changed files with 76 additions and 79 deletions

View File

@@ -51,8 +51,8 @@ template <typename Derived, typename TUserInfo,
class CallbackThread : public wpi::SafeThread {
public:
typedef TUserInfo UserInfo;
typedef TNotifierData NotifierData;
typedef TListenerData ListenerData;
using NotifierData = TNotifierData;
using ListenerData = TListenerData;
~CallbackThread() {
// Wake up any blocked pollers

View File

@@ -39,11 +39,10 @@ class NetworkConnection : public INetworkConnection {
std::function<std::shared_ptr<Message>()> get_msg,
std::function<void(wpi::ArrayRef<std::shared_ptr<Message>>)> send_msgs)>
HandshakeFunc;
typedef std::function<void(std::shared_ptr<Message> msg,
NetworkConnection* conn)>
ProcessIncomingFunc;
typedef std::vector<std::shared_ptr<Message>> Outgoing;
typedef wpi::ConcurrentQueue<Outgoing> OutgoingQueue;
using ProcessIncomingFunc =
std::function<void(std::shared_ptr<Message>, NetworkConnection*)>;
using Outgoing = std::vector<std::shared_ptr<Message>>;
using OutgoingQueue = wpi::ConcurrentQueue<Outgoing>;
NetworkConnection(unsigned int uid,
std::unique_ptr<wpi::NetworkStream> stream,

View File

@@ -190,11 +190,11 @@ class Storage : public IStorage {
};
typedef wpi::StringMap<Entry*> EntriesMap;
typedef std::vector<Entry*> IdMap;
typedef std::vector<std::unique_ptr<Entry>> LocalMap;
typedef std::pair<unsigned int, unsigned int> RpcIdPair;
typedef wpi::DenseMap<RpcIdPair, std::string> RpcResultMap;
typedef wpi::SmallSet<RpcIdPair, 12> RpcBlockingCallSet;
using IdMap = std::vector<Entry*>;
using LocalMap = std::vector<std::unique_ptr<Entry>>;
using RpcIdPair = std::pair<unsigned int, unsigned int>;
using RpcResultMap = wpi::DenseMap<RpcIdPair, std::string>;
using RpcBlockingCallSet = wpi::SmallSet<RpcIdPair, 12>;
mutable wpi::mutex m_mutex;
EntriesMap m_entries;

View File

@@ -21,7 +21,7 @@ namespace {
class LoadPersistentImpl {
public:
typedef std::pair<std::string, std::shared_ptr<Value>> Entry;
typedef std::function<void(size_t line, const char* msg)> WarnFunc;
using WarnFunc = std::function<void(size_t, const char*)>;
LoadPersistentImpl(wpi::raw_istream& is, WarnFunc warn)
: m_is(is), m_warn(warn) {}