• Stephan Bergmann's avatar
    salhelper::SingletonRef copy ctor is broken, mark as deleted · 6ebc026e
    Stephan Bergmann yazdı
    If that (implicitly defined) ctor had ever been used, it would have failed to
    increment m_nRef, so could have caused m_pInstance to be deleted too early.  So
    better mark it as deleted.  (LO itself apparently didn't call it.  If 3rd party
    code would want to call it after all, it could be changed from deleted to
    properly user-provided, incrementing m_nRef, in the future.)
    
    The implicitly defined copy assignment op happens to already do the right thing,
    and /is/ used, e.g., during
    
    >         m_aNode = _rhs.m_aNode;
    
    in DriversConfig::operator= (connectivity/source/commontools/DriversConfig.cxx).
    Mark it as defaulted to avoid -Wdeprecated-copy with GCC trunk towards GCC 9.
    
    Change-Id: I527123d9de837c311d30a270feb09dc173d9f411
    Reviewed-on: https://gerrit.libreoffice.org/56512
    Tested-by: Jenkins
    Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
    6ebc026e
singletonref.hxx 6.44 KB