summaryrefslogtreecommitdiff
path: root/lib/backupstore
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2009-06-28 19:25:25 +0000
committerChris Wilson <chris+github@qwirx.com>2009-06-28 19:25:25 +0000
commitb825423ed5c17f244047bddaeaa6cbbb4742ce1a (patch)
tree005b4d928f2cae939b9c9be3f56c1de2ca7fcff2 /lib/backupstore
parentccf38b0c4d1df1ea1efd215a38f65e6056c7fcea (diff)
Make GetRefCount return a refcount_t rather than an int32_t.
Make refcount_t unsigned and make its definition public.
Diffstat (limited to 'lib/backupstore')
-rw-r--r--lib/backupstore/BackupStoreRefCountDatabase.cpp3
-rw-r--r--lib/backupstore/BackupStoreRefCountDatabase.h8
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/backupstore/BackupStoreRefCountDatabase.cpp b/lib/backupstore/BackupStoreRefCountDatabase.cpp
index 92ba947d..322c0da7 100644
--- a/lib/backupstore/BackupStoreRefCountDatabase.cpp
+++ b/lib/backupstore/BackupStoreRefCountDatabase.cpp
@@ -247,7 +247,8 @@ void BackupStoreRefCountDatabase::Save()
// Created: 2009/06/01
//
// --------------------------------------------------------------------------
-int32_t BackupStoreRefCountDatabase::GetRefCount(int64_t ObjectID) const
+BackupStoreRefCountDatabase::refcount_t
+BackupStoreRefCountDatabase::GetRefCount(int64_t ObjectID) const
{
IOStream::pos_type offset = GetOffset(ObjectID);
diff --git a/lib/backupstore/BackupStoreRefCountDatabase.h b/lib/backupstore/BackupStoreRefCountDatabase.h
index 0a65b6a0..02612aa0 100644
--- a/lib/backupstore/BackupStoreRefCountDatabase.h
+++ b/lib/backupstore/BackupStoreRefCountDatabase.h
@@ -52,6 +52,8 @@ class BackupStoreRefCountDatabase
{
friend class BackupStoreCheck;
friend class BackupStoreContext;
+ friend class HousekeepStoreAccount;
+
public:
~BackupStoreRefCountDatabase();
private:
@@ -73,8 +75,10 @@ public:
static std::auto_ptr<BackupStoreRefCountDatabase> Load(const
BackupStoreAccountDatabase::Entry& rAccount, bool ReadOnly);
+ typedef uint32_t refcount_t;
+
// Data access functions
- int32_t GetRefCount(int64_t ObjectID) const;
+ refcount_t GetRefCount(int64_t ObjectID) const;
int64_t GetLastObjectIDUsed() const;
// Data modification functions
@@ -94,8 +98,6 @@ private:
static void Create(const BackupStoreAccountDatabase::Entry& rAccount,
bool AllowOverwrite);
- typedef int32_t refcount_t;
-
static std::string GetFilename(const BackupStoreAccountDatabase::Entry&
rAccount);
IOStream::pos_type GetSize() const