VirtualBox

Ignore:
Timestamp:
Sep 20, 2018 3:46:38 PM (6 years ago)
Author:
vboxsync
Message:

IPRT/rest: Early support for polymorphic data objects in the data model. bugref:9167 ..\..\ e:\vbox\svn\trunk\include\iprt\

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/rest/RTCRestArrayBase.cpp

    r74263 r74386  
    9090*********************************************************************************************************************************/
    9191
     92RTCRestObjectBase *RTCRestArrayBase::baseClone() const
     93{
     94    RTCRestArrayBase *pClone = createClone();
     95    if (pClone)
     96    {
     97        int rc = pClone->copyArrayWorker(*this, false /*fThrow*/);
     98        if (RT_SUCCESS(rc))
     99            return pClone;
     100        delete pClone;
     101    }
     102    return NULL;
     103}
     104
     105
    92106int RTCRestArrayBase::resetToDefault()
    93107{
     
    458472{
    459473    int rc;
    460     RTCRestObjectBase *pValueCopy = createValueCopy(&a_rValue);
     474    RTCRestObjectBase *pValueCopy = a_rValue.baseClone();
    461475    if (pValueCopy)
    462476    {
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