[Box Backup-commit] COMMIT r2539 - box/trunk/lib/backupstore

boxbackup-dev at boxbackup.org boxbackup-dev at boxbackup.org
Sun Jun 28 20:25:25 BST 2009


Author: chris
Date: 2009-06-28 20:25:25 +0100 (Sun, 28 Jun 2009)
New Revision: 2539

Modified:
   box/trunk/lib/backupstore/BackupStoreRefCountDatabase.cpp
   box/trunk/lib/backupstore/BackupStoreRefCountDatabase.h
Log:
Make GetRefCount return a refcount_t rather than an int32_t.

Make refcount_t unsigned and make its definition public.


Modified: box/trunk/lib/backupstore/BackupStoreRefCountDatabase.cpp
===================================================================
--- box/trunk/lib/backupstore/BackupStoreRefCountDatabase.cpp	2009-06-28 19:24:02 UTC (rev 2538)
+++ box/trunk/lib/backupstore/BackupStoreRefCountDatabase.cpp	2009-06-28 19:25:25 UTC (rev 2539)
@@ -247,7 +247,8 @@
 //		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);
 

Modified: box/trunk/lib/backupstore/BackupStoreRefCountDatabase.h
===================================================================
--- box/trunk/lib/backupstore/BackupStoreRefCountDatabase.h	2009-06-28 19:24:02 UTC (rev 2538)
+++ box/trunk/lib/backupstore/BackupStoreRefCountDatabase.h	2009-06-28 19:25:25 UTC (rev 2539)
@@ -52,6 +52,8 @@
 {
 	friend class BackupStoreCheck;
 	friend class BackupStoreContext;
+	friend class HousekeepStoreAccount;
+
 public:
 	~BackupStoreRefCountDatabase();
 private:
@@ -73,8 +75,10 @@
 	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 @@
 	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




More information about the Boxbackup-commit mailing list