VirtualBox

Changeset 85559 in vbox for trunk/src


Ignore:
Timestamp:
Jul 30, 2020 1:37:36 PM (4 years ago)
Author:
vboxsync
Message:

DnD/Main: Return boolean as return value for GuestDnDBase::i_isFormatSupported().

Location:
trunk/src/VBox/Main
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestDnDPrivate.h

    r85558 r85559  
    998998    /** Shared (internal) IDnDBase method implementations.
    999999     * @{ */
    1000     HRESULT i_isFormatSupported(const com::Utf8Str &aFormat, BOOL *aSupported);
     1000    bool i_isFormatSupported(const com::Utf8Str &aFormat) const;
    10011001    const GuestDnDMIMEList &i_getFormats(void) const;
    10021002    HRESULT i_addFormats(const GuestDnDMIMEList &aFormats);
  • trunk/src/VBox/Main/src-client/GuestDnDPrivate.cpp

    r85558 r85559  
    11641164 * Checks whether a given DnD format is supported or not.
    11651165 *
    1166  * @returns HRESULT
     1166 * @returns \c true if supported, \c false if not.
    11671167 * @param   aFormat             DnD format to check.
    1168  * @param   aSupported          Where to return \c TRUE if supported, or \c FALSE if not.
    1169  */
    1170 HRESULT GuestDnDBase::i_isFormatSupported(const com::Utf8Str &aFormat, BOOL *aSupported)
    1171 {
    1172     *aSupported = std::find(m_lstFmtSupported.begin(),
    1173                             m_lstFmtSupported.end(), aFormat) != m_lstFmtSupported.end()
    1174                 ? TRUE : FALSE;
    1175     return S_OK;
     1168 */
     1169bool GuestDnDBase::i_isFormatSupported(const com::Utf8Str &aFormat) const
     1170{
     1171    return std::find(m_lstFmtSupported.begin(), m_lstFmtSupported.end(), aFormat) != m_lstFmtSupported.end();
    11761172}
    11771173
  • trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp

    r85558 r85559  
    186186    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    187187
    188     return GuestDnDBase::i_isFormatSupported(aFormat, aSupported);
     188    *aSupported = GuestDnDBase::i_isFormatSupported(aFormat) ? TRUE : FALSE;
     189
     190    return S_OK;
    189191#endif /* VBOX_WITH_DRAG_AND_DROP */
    190192}
  • trunk/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp

    r85558 r85559  
    184184    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    185185
    186     return GuestDnDBase::i_isFormatSupported(aFormat, aSupported);
     186    *aSupported = GuestDnDBase::i_isFormatSupported(aFormat) ? TRUE : FALSE;
     187
     188    return S_OK;
    187189#endif /* VBOX_WITH_DRAG_AND_DROP */
    188190}
Note: See TracChangeset for help on using the changeset viewer.

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