summaryrefslogtreecommitdiffstats
path: root/fnet
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-12-21 18:37:21 +0100
committerGitHub <noreply@github.com>2022-12-21 18:37:21 +0100
commit541a88143878c25d771a6878376ef66416d54102 (patch)
tree6a2d66962f39b0bb362e5dfdfc1536d1fcf7b9fb /fnet
parent766ee34d38c47deb1a234590eba6413d075d822a (diff)
parent13c416cd71b9927b60cc5ea4c9bcecafe472e8c9 (diff)
Merge pull request #25325 from vespa-engine/geirst/typedef-to-using-in-cpp-code
Change from typedef to using in C++ code.
Diffstat (limited to 'fnet')
-rw-r--r--fnet/src/vespa/fnet/channel.h2
-rw-r--r--fnet/src/vespa/fnet/packet.h4
-rw-r--r--fnet/src/vespa/fnet/signalshutdown.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/fnet/src/vespa/fnet/channel.h b/fnet/src/vespa/fnet/channel.h
index 52d38db17f8..13052952f44 100644
--- a/fnet/src/vespa/fnet/channel.h
+++ b/fnet/src/vespa/fnet/channel.h
@@ -27,7 +27,7 @@ private:
FNET_Channel &operator=(const FNET_Channel &);
public:
- typedef std::unique_ptr<FNET_Channel> UP;
+ using UP = std::unique_ptr<FNET_Channel>;
FNET_Channel(uint32_t id = FNET_NOID, FNET_Connection * conn = nullptr, FNET_IPacketHandler * handler = nullptr, FNET_Context context = FNET_Context())
: _id(id), _conn(conn), _handler(handler), _context(context)
diff --git a/fnet/src/vespa/fnet/packet.h b/fnet/src/vespa/fnet/packet.h
index c32c56eb6d5..2cd620b6955 100644
--- a/fnet/src/vespa/fnet/packet.h
+++ b/fnet/src/vespa/fnet/packet.h
@@ -18,8 +18,8 @@ class FNET_DataBuffer;
class FNET_Packet
{
public:
- typedef std::unique_ptr<FNET_Packet> UP;
- typedef std::shared_ptr<FNET_Packet> SP;
+ using UP = std::unique_ptr<FNET_Packet>;
+ using SP = std::shared_ptr<FNET_Packet>;
/** Does nothing. **/
FNET_Packet() {}
diff --git a/fnet/src/vespa/fnet/signalshutdown.cpp b/fnet/src/vespa/fnet/signalshutdown.cpp
index cabc564b007..de1090c5b7a 100644
--- a/fnet/src/vespa/fnet/signalshutdown.cpp
+++ b/fnet/src/vespa/fnet/signalshutdown.cpp
@@ -14,7 +14,7 @@ FNET_SignalShutDown::FNET_SignalShutDown(FNET_Transport &t)
void
FNET_SignalShutDown::PerformTask()
{
- typedef vespalib::SignalHandler SIG;
+ using SIG = vespalib::SignalHandler;
if (SIG::INT.check() || SIG::TERM.check()) {
fprintf(stderr, "got signal, shutting down...\n");
_transport.ShutDown(false);
@@ -26,7 +26,7 @@ FNET_SignalShutDown::PerformTask()
void
FNET_SignalShutDown::hookSignals()
{
- typedef vespalib::SignalHandler SIG;
+ using SIG = vespalib::SignalHandler;
SIG::INT.hook();
SIG::TERM.hook();
}