[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - net/loolnb.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Sat Feb 18 00:41:13 UTC 2017


 net/loolnb.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ca9592e54b9fdd5bbc925fbdc408958a2a62282f
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Fri Feb 17 12:46:53 2017 -0500

    nb: use make_shared where possible
    
    Change-Id: I7fb4e7086ac0ce86447db9de4c7ac77cdd7b40af
    Reviewed-on: https://gerrit.libreoffice.org/34387
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>

diff --git a/net/loolnb.cpp b/net/loolnb.cpp
index 17909cb..a235ba7 100644
--- a/net/loolnb.cpp
+++ b/net/loolnb.cpp
@@ -321,7 +321,7 @@ public:
         // Accept a connection (if any) and set it to non-blocking.
         // We don't care about the client's address, so ignored.
         const int rc = ::accept4(getFD(), nullptr, nullptr, SOCK_NONBLOCK);
-        return std::shared_ptr<T>(rc != -1 ? new T(rc) : nullptr);
+        return (rc != -1 ? std::make_shared<T>(rc) : std::shared_ptr<T>(nullptr));
     }
 
     int getPollEvents() override


More information about the Libreoffice-commits mailing list