[build] Upgrade clang-format and clang-tidy (NFC) (#3422)

This commit is contained in:
Tyler Veness
2021-06-10 11:13:09 -07:00
committed by GitHub
parent 099fde97d5
commit a77c6ff3a2
29 changed files with 66 additions and 48 deletions

View File

@@ -37,7 +37,7 @@ class DispatcherBase : public IDispatcher {
friend class DispatcherTest;
public:
typedef std::function<std::unique_ptr<wpi::NetworkStream>()> Connector;
using Connector = std::function<std::unique_ptr<wpi::NetworkStream>()>;
DispatcherBase(IStorage& storage, IConnectionNotifier& notifier,
wpi::Logger& logger);

View File

@@ -37,7 +37,7 @@ class Message {
kExecuteRpc = 0x20,
kRpcResponse = 0x21
};
typedef std::function<NT_Type(unsigned int id)> GetEntryTypeFunc;
using GetEntryTypeFunc = std::function<NT_Type(unsigned int id)>;
Message() = default;
Message(MsgType type, const private_init&) : m_type(type) {}

View File

@@ -36,11 +36,10 @@ class IConnectionNotifier;
class NetworkConnection : public INetworkConnection {
public:
typedef std::function<bool(
using HandshakeFunc = std::function<bool(
NetworkConnection& conn,
std::function<std::shared_ptr<Message>()> get_msg,
std::function<void(wpi::span<std::shared_ptr<Message>>)> send_msgs)>
HandshakeFunc;
std::function<void(wpi::span<std::shared_ptr<Message>>)> send_msgs)>;
using ProcessIncomingFunc =
std::function<void(std::shared_ptr<Message>, NetworkConnection*)>;
using Outgoing = std::vector<std::shared_ptr<Message>>;

View File

@@ -19,7 +19,7 @@ namespace nt {
namespace impl {
typedef std::pair<unsigned int, unsigned int> RpcIdPair;
using RpcIdPair = std::pair<unsigned int, unsigned int>;
struct RpcNotifierData : public RpcAnswer {
RpcNotifierData(NT_Entry entry_, NT_RpcCall call_, std::string_view name_,

View File

@@ -197,7 +197,7 @@ class Storage : public IStorage {
unsigned int rpc_call_uid{0};
};
typedef wpi::StringMap<Entry*> EntriesMap;
using EntriesMap = wpi::StringMap<Entry*>;
using IdMap = std::vector<Entry*>;
using LocalMap = std::vector<std::unique_ptr<Entry>>;
using RpcIdPair = std::pair<unsigned int, unsigned int>;

View File

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