summaryrefslogtreecommitdiff
path: root/lib/backupstore/BackupStoreAccountDatabase.cpp
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2009-06-27 11:34:19 +0000
committerChris Wilson <chris+github@qwirx.com>2009-06-27 11:34:19 +0000
commit1947e0d3b89d8f4899d9fe14339ab4f54c14c830 (patch)
treebcc90dee6f2a565a929424c9dd031c03bc9e2f92 /lib/backupstore/BackupStoreAccountDatabase.cpp
parent772b9f79c3865f02d97b926960e22d50ca56c9b8 (diff)
Make BackupStoreAccountDatabase::AddEntry and
BackupStoreAccountDatabase::GetEntry return a copy of the new entry.
Diffstat (limited to 'lib/backupstore/BackupStoreAccountDatabase.cpp')
-rw-r--r--lib/backupstore/BackupStoreAccountDatabase.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/backupstore/BackupStoreAccountDatabase.cpp b/lib/backupstore/BackupStoreAccountDatabase.cpp
index 46cab68f..72a813d5 100644
--- a/lib/backupstore/BackupStoreAccountDatabase.cpp
+++ b/lib/backupstore/BackupStoreAccountDatabase.cpp
@@ -289,7 +289,8 @@ bool BackupStoreAccountDatabase::EntryExists(int32_t ID) const
// 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 @@ const BackupStoreAccountDatabase::Entry &BackupStoreAccountDatabase::GetEntry(in
// 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];
}