net/loolnb.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit ca9592e54b9fdd5bbc925fbdc408958a2a62282f
Author: Ashod Nakashian <[email protected]>
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 <[email protected]>
Tested-by: Ashod Nakashian <[email protected]>
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
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits