VirtualBox

Changeset 61009 in vbox for trunk/src/VBox/Main/src-all


Ignore:
Timestamp:
May 17, 2016 5:18:29 PM (9 years ago)
Author:
vboxsync
Message:

Main: big settings cleanup and writing optimization. Moved constructors/equality/default checks into the .cpp file, and write only settings which aren't at the default value. Greatly reduces the effort needed to write everything out, especially when a lot of snapshots have to be dealt with. Move the storage controllers to the hardware settings, where they always belonged. No change to the XML file (yet). Lots of settings related cleanups in the API code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/PCIDeviceAttachmentImpl.cpp

    r58959 r61009  
    77
    88/*
    9  * Copyright (C) 2010-2012 Oracle Corporation
     9 * Copyright (C) 2010-2016 Oracle Corporation
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2323#include "Logging.h"
    2424
     25#include <VBox/settings.h>
     26
    2527struct PCIDeviceAttachment::Data
    2628{
    27     Data(const Bstr    &aDevName,
     29    Data(const Utf8Str &aDevName,
    2830         LONG          aHostAddress,
    2931         LONG          aGuestAddress,
     
    3537    }
    3638
    37     Bstr             DevName;
     39    Utf8Str          DevName;
    3840    LONG             HostAddress;
    3941    LONG             GuestAddress;
     
    6163/////////////////////////////////////////////////////////////////////////////
    6264HRESULT PCIDeviceAttachment::init(IMachine      *aParent,
    63                                   const Bstr  &aDevName,
     65                                  const Utf8Str &aDevName,
    6466                                  LONG          aHostAddress,
    6567                                  LONG          aGuestAddress,
     
    8385                                            const settings::HostPCIDeviceAttachment &hpda)
    8486{
    85     Bstr bname(hpda.strDeviceName);
    86     return init(aParent, bname,  hpda.uHostAddress, hpda.uGuestAddress, TRUE);
     87    return init(aParent, hpda.strDeviceName, hpda.uHostAddress, hpda.uGuestAddress, TRUE);
    8788}
    8889
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