VirtualBox

Changeset 26088 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jan 28, 2010 4:50:32 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57051
Message:

Main: debugging notes, coding style

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/AudioAdapterImpl.cpp

    r26046 r26088  
    414414}
    415415
     416bool AudioAdapter::isModified()
     417{
     418    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     419    return mData.isBackedUp();
     420}
     421
     422bool AudioAdapter::isReallyModified()
     423{
     424    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     425    return mData.hasActualChanges();
     426}
     427
    416428/**
    417429 *  @note Locks this object for writing.
     
    471483 *  represented by @a aThat (locked for reading).
    472484 */
    473 void AudioAdapter::copyFrom (AudioAdapter *aThat)
     485void AudioAdapter::copyFrom(AudioAdapter *aThat)
    474486{
    475487    AssertReturnVoid (aThat != NULL);
     
    489501
    490502    /* this will back up current data */
    491     mData.assignCopy (aThat->mData);
     503    mData.assignCopy(aThat->mData);
    492504}
    493505/* vi: set tabstop=4 shiftwidth=4 expandtab: */
  • trunk/src/VBox/Main/MachineImpl.cpp

    r26044 r26088  
    588588
    589589        /* commit all changes made during loading the settings file */
    590         commit();
     590        commit(); // @todo r=dj why do we need a commit during init?!? this is very expensive
    591591    }
    592592    else
     
    96109610     * This is copied from registeredInit(), and may or may not be the right
    96119611     * way to handle this.
     9612     *
     9613     * @todo r=dj review this, this gets called during machine power-down when
     9614     * we have already saved the machine settings, there's no need to do this
     9615     * twice.
    96129616     */
    96139617    Assert(mData->mRegistered);
  • trunk/src/VBox/Main/SnapshotImpl.cpp

    r26051 r26088  
    10241024    if (SUCCEEDED(rc))
    10251025        /* commit all changes made during the initialization */
    1026         commit();
     1026        commit();   // @todo r=dj why do we need a commit in init?!? this is very expensive
    10271027
    10281028    /* Confirm a successful initialization when it's the case */
  • trunk/src/VBox/Main/include/AudioAdapterImpl.h

    r26044 r26088  
    7575
    7676    // public initializer/uninitializer for internal purposes only
    77     HRESULT init (Machine *aParent);
    78     HRESULT init (Machine *aParent, AudioAdapter *aThat);
    79     HRESULT initCopy (Machine *aParent, AudioAdapter *aThat);
     77    HRESULT init(Machine *aParent);
     78    HRESULT init(Machine *aParent, AudioAdapter *aThat);
     79    HRESULT initCopy(Machine *aParent, AudioAdapter *aThat);
    8080    void uninit();
    8181
    8282    STDMETHOD(COMGETTER(Enabled))(BOOL *aEnabled);
    8383    STDMETHOD(COMSETTER(Enabled))(BOOL aEnabled);
    84     STDMETHOD(COMGETTER(AudioDriver)) (AudioDriverType_T *aAudioDriverType);
    85     STDMETHOD(COMSETTER(AudioDriver)) (AudioDriverType_T aAudioDriverType);
    86     STDMETHOD(COMGETTER(AudioController)) (AudioControllerType_T *aAudioControllerType);
    87     STDMETHOD(COMSETTER(AudioController)) (AudioControllerType_T aAudioControllerType);
     84    STDMETHOD(COMGETTER(AudioDriver))(AudioDriverType_T *aAudioDriverType);
     85    STDMETHOD(COMSETTER(AudioDriver))(AudioDriverType_T aAudioDriverType);
     86    STDMETHOD(COMGETTER(AudioController))(AudioControllerType_T *aAudioControllerType);
     87    STDMETHOD(COMSETTER(AudioController))(AudioControllerType_T aAudioControllerType);
    8888
    8989    // public methods only for internal purposes
     
    9292    HRESULT saveSettings(settings::AudioAdapter &data);
    9393
    94     bool isModified() { AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); return mData.isBackedUp(); }
    95     bool isReallyModified() { AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); return mData.hasActualChanges(); }
     94    bool isModified();
     95    bool isReallyModified();
    9696    bool rollback();
    9797    void commit();
    98     void copyFrom (AudioAdapter *aThat);
     98    void copyFrom(AudioAdapter *aThat);
    9999
    100100    // for VirtualBoxSupportErrorInfoImpl
  • trunk/src/VBox/Main/include/AutoStateDep.h

    r26046 r26088  
    5757
    5858        AutoStateDependency(Machine *aThat)
    59             : mThat(aThat), mRC(S_OK)
    60             , mMachineState(MachineState_Null)
    61             , mRegistered(FALSE)
     59            : mThat(aThat), mRC(S_OK),
     60              mMachineState(MachineState_Null),
     61              mRegistered(FALSE)
    6262        {
    6363            Assert(aThat);
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