[Box Backup-commit] COMMIT r2530 - box/trunk/lib/backupstore
boxbackup-dev at boxbackup.org
boxbackup-dev at boxbackup.org
Sat Jun 27 12:34:20 BST 2009
Author: chris
Date: 2009-06-27 12:34:19 +0100 (Sat, 27 Jun 2009)
New Revision: 2530
Modified:
box/trunk/lib/backupstore/BackupStoreAccountDatabase.cpp
box/trunk/lib/backupstore/BackupStoreAccountDatabase.h
Log:
Make BackupStoreAccountDatabase::AddEntry and
BackupStoreAccountDatabase::GetEntry return a copy of the new entry.
Modified: box/trunk/lib/backupstore/BackupStoreAccountDatabase.cpp
===================================================================
--- box/trunk/lib/backupstore/BackupStoreAccountDatabase.cpp 2009-06-27 11:28:15 UTC (rev 2529)
+++ box/trunk/lib/backupstore/BackupStoreAccountDatabase.cpp 2009-06-27 11:34:19 UTC (rev 2530)
@@ -289,7 +289,8 @@
// Created: 2003/08/21
//
// --------------------------------------------------------------------------
-const BackupStoreAccountDatabase::Entry &BackupStoreAccountDatabase::GetEntry(int32_t ID) const
+BackupStoreAccountDatabase::Entry BackupStoreAccountDatabase::GetEntry(
+ int32_t ID) const
{
// Check that we're using the latest version of the database
CheckUpToDate();
@@ -311,12 +312,14 @@
// Created: 2003/08/21
//
// --------------------------------------------------------------------------
-void BackupStoreAccountDatabase::AddEntry(int32_t ID, int DiscSet)
+BackupStoreAccountDatabase::Entry BackupStoreAccountDatabase::AddEntry(
+ int32_t ID, int DiscSet)
{
// Check that we're using the latest version of the database
CheckUpToDate();
pImpl->mDatabase[ID] = Entry(ID, DiscSet);
+ return pImpl->mDatabase[ID];
}
Modified: box/trunk/lib/backupstore/BackupStoreAccountDatabase.h
===================================================================
--- box/trunk/lib/backupstore/BackupStoreAccountDatabase.h 2009-06-27 11:28:15 UTC (rev 2529)
+++ box/trunk/lib/backupstore/BackupStoreAccountDatabase.h 2009-06-27 11:34:19 UTC (rev 2530)
@@ -55,8 +55,8 @@
};
bool EntryExists(int32_t ID) const;
- const Entry &GetEntry(int32_t ID) const;
- void AddEntry(int32_t ID, int DiscSet);
+ Entry GetEntry(int32_t ID) const;
+ Entry AddEntry(int32_t ID, int DiscSet);
void DeleteEntry(int32_t ID);
// This interface should change in the future. But for now it'll do.
More information about the Boxbackup-commit
mailing list