Changeset 38141 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jul 25, 2011 10:27:35 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 73096
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImplCloneVM.cpp
r38121 r38141 108 108 109 109 /* MachineCloneVM::run helper: */ 110 settings::Snapshot findSnapshot(settings::MachineConfigFile *pMCF, const settings::SnapshotsList &snl, const Guid &id) const;110 bool findSnapshot(const settings::SnapshotsList &snl, const Guid &id, settings::Snapshot &sn) const; 111 111 void updateMACAddresses(settings::NetworkAdaptersList &nwl) const; 112 112 void updateMACAddresses(settings::SnapshotsList &sl) const; … … 530 530 } 531 531 532 settings::Snapshot MachineCloneVMPrivate::findSnapshot(settings::MachineConfigFile *pMCF, const settings::SnapshotsList &snl, const Guid &id) const532 bool MachineCloneVMPrivate::findSnapshot(const settings::SnapshotsList &snl, const Guid &id, settings::Snapshot &sn) const 533 533 { 534 534 settings::SnapshotsList::const_iterator it; … … 536 536 { 537 537 if (it->uuid == id) 538 return *it; 538 { 539 sn = (*it); 540 return true; 541 } 539 542 else if (!it->llChildSnapshots.empty()) 540 return findSnapshot(pMCF, it->llChildSnapshots, id); 541 } 542 return settings::Snapshot(); 543 { 544 if (findSnapshot(it->llChildSnapshots, id, sn)) 545 return true; 546 } 547 } 548 return false; 543 549 } 544 550 … … 922 928 settings::Snapshot sn; 923 929 if (!d->snapshotId.isEmpty()) 924 sn = d->findSnapshot(&trgMCF, trgMCF.llFirstSnapshot, d->snapshotId);930 d->findSnapshot(trgMCF.llFirstSnapshot, d->snapshotId, sn); 925 931 926 932 if (d->mode == CloneMode_MachineState)
Note:
See TracChangeset
for help on using the changeset viewer.