VirtualBox

Changeset 97798 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Dec 13, 2022 5:10:34 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
154873
Message:

DnD/Main: Reset handling fixes: Use reset() with the GuestDnDState constructor; shorter and less error prone. No need to perform a reset within the destructor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/GuestDnDPrivate.cpp

    r97788 r97798  
    295295
    296296GuestDnDState::GuestDnDState(const ComObjPtr<Guest>& pGuest)
    297     : m_enmState(VBOXDNDSTATE_UNKNOWN)
    298     , m_uProtocolVersion(0)
     297    : m_uProtocolVersion(0)
    299298    , m_fGuestFeatures0(VBOX_DND_GF_NONE)
    300299    , m_EventSem(NIL_RTSEMEVENT)
    301     , m_rcGuest(VERR_IPE_UNINITIALIZED_STATUS)
    302     , m_dndActionDefault(0)
    303     , m_dndLstActionsAllowed(0)
    304300    , m_pParent(pGuest)
    305301{
     302    reset();
     303
    306304    int rc = RTCritSectInit(&m_CritSect);
    307305    if (RT_FAILURE(rc))
     
    314312GuestDnDState::~GuestDnDState(void)
    315313{
    316     reset();
    317 
    318314    int rc = RTSemEventDestroy(m_EventSem);
    319315    AssertRC(rc);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette