diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/backupstore/BackupStoreAccountDatabase.cpp | 7 | ||||
-rw-r--r-- | lib/backupstore/BackupStoreAccountDatabase.h | 4 |
2 files changed, 7 insertions, 4 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]; } diff --git a/lib/backupstore/BackupStoreAccountDatabase.h b/lib/backupstore/BackupStoreAccountDatabase.h index 8d6e7ad8..79573242 100644 --- a/lib/backupstore/BackupStoreAccountDatabase.h +++ b/lib/backupstore/BackupStoreAccountDatabase.h @@ -55,8 +55,8 @@ public: }; 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. |