[Libreoffice-commits] online.git: wsd/LOOLWSD.hpp

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 8 11:52:53 UTC 2020


 wsd/LOOLWSD.hpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e087a0079c15061c348c5f8c4a24bbdbe36e507a
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Apr 8 11:49:39 2020 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Apr 8 13:52:35 2020 +0200

    ForKitProcWSHandler: remove std::enable_shared_from_this inheritance
    
    This was added in commit 70af76e28cbca4a45869fcecfe221d21eb7a3790
    (Replaced pipe with websocket based on Unix socket in communication with
    ForKit, 2020-04-02), but it seems to me that the shared_from_this()
    member function (which is now available, due to ineritance) is not
    actually called anywhere, so this is not necessary.
    
    Additionally, Debian 8 / gcc-4.9 has problems compiling this:
    
            In file included from /usr/include/c++/4.9/bits/shared_ptr.h:52:0,
                             from /usr/include/c++/4.9/memory:82,
                             from wsd/AdminModel.hpp:13,
                             from wsd/AdminModel.cpp:12:
            /usr/include/c++/4.9/bits/shared_ptr_base.h: In instantiation of ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<ForKitProcWSHandler>; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}; _Tp = ForKitProcWSHandler; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2u]’:
            /usr/include/c++/4.9/bits/shared_ptr.h:316:64:   required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<ForKitProcWSHandler>; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}; _Tp = ForKitProcWSHandler]’
            /usr/include/c++/4.9/bits/shared_ptr.h:588:39:   required from ‘std::shared_ptr<_Tp1> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = ForKitProcWSHandler; _Alloc = std::allocator<ForKitProcWSHandler>; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}]’
            /usr/include/c++/4.9/bits/shared_ptr.h:604:42:   required from ‘std::shared_ptr<_Tp1> std::make_shared(_Args&& ...) [with _Tp = ForKitProcWSHandler; _Args = {std::shared_ptr<StreamSocket>&, const Poco::Net::HTTPRequest&}]’
            ./wsd/LOOLWSD.hpp:201:97:   required from here
            /usr/include/c++/4.9/bits/shared_ptr_base.h:1096:64: error: call of overloaded ‘__enable_shared_from_this_helper(std::__shared_count<>&, ForKitProcWSHandler*&, ForKitProcWSHandler*&)’ is ambiguous
    
    So just remove it till that inheritance is needed.
    
    Change-Id: I74d38b90bcf06d4490feed31783c098ed831f1ee
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91879
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Reviewed-by: Gabriel Masei <gabriel.masei at 1and1.ro>

diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index 33056538f..034dbfbe0 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/LOOLWSD.hpp
@@ -182,7 +182,7 @@ public:
     std::shared_ptr<Socket> _socket;
 };
 
-class ForKitProcWSHandler: public WebSocketHandler, public std::enable_shared_from_this<ForKitProcWSHandler>
+class ForKitProcWSHandler: public WebSocketHandler
 {
 public:
 


More information about the Libreoffice-commits mailing list