diff options
author | AG <contact@grandville.net> | 2015-10-26 23:18:51 +0100 |
---|---|---|
committer | AG <contact@grandville.net> | 2015-10-26 23:18:51 +0100 |
commit | 57198ec30c5678c5a5ed26ef6b345d289bb48e50 (patch) | |
tree | 5f51b8068ab38037ab86ce9fcb30e729ca769da9 /lib/backupstore | |
parent | ad1c0240f9ac4c56519cf0e5c2765b7edfc30ca0 (diff) |
add specific define to allow the use of std::min and sd::max from windows
Diffstat (limited to 'lib/backupstore')
-rw-r--r-- | lib/backupstore/BackupStoreFile.cpp | 4 | ||||
-rw-r--r-- | lib/backupstore/BackupStoreRefCountDatabase.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/backupstore/BackupStoreFile.cpp b/lib/backupstore/BackupStoreFile.cpp index 5ceefe90..99562685 100644 --- a/lib/backupstore/BackupStoreFile.cpp +++ b/lib/backupstore/BackupStoreFile.cpp @@ -304,7 +304,7 @@ void BackupStoreFile::VerifyStream::Write(const void *pBuffer, int NBytes, int T size_t BytesLeftInCurrentUnit = mCurrentUnitSize - mCurrentUnitData.GetSize(); // Add however many bytes are needed/available to the current unit's buffer. - BytesToAdd = min(BytesLeftInCurrentUnit, (size_t)NBytes); + BytesToAdd = std::min(BytesLeftInCurrentUnit, (size_t)NBytes); } // We must make progress here, or we could have infinite recursion. @@ -502,7 +502,7 @@ void BackupStoreFile::VerifyStream::Close(bool CloseCopyStream) CollectInBufferStream* pPreviousBuffer = mCurrentBufferIsAlternate ? &mCurrentUnitData : &mAlternateData; - int64_t BytesFromCurrentBuffer = min(mBlockIndexSize, + int64_t BytesFromCurrentBuffer = std::min(mBlockIndexSize, (int64_t)pCurrentBuffer->GetSize()); int64_t BytesFromPreviousBuffer = mBlockIndexSize - BytesFromCurrentBuffer; diff --git a/lib/backupstore/BackupStoreRefCountDatabase.cpp b/lib/backupstore/BackupStoreRefCountDatabase.cpp index 24c7b38e..8b51b70a 100644 --- a/lib/backupstore/BackupStoreRefCountDatabase.cpp +++ b/lib/backupstore/BackupStoreRefCountDatabase.cpp @@ -346,7 +346,7 @@ int BackupStoreRefCountDatabase::ReportChangesTo(BackupStoreRefCountDatabase& rO int64_t MaxNewObjectId = GetLastObjectIDUsed(); for (int64_t ObjectID = BACKUPSTORE_ROOT_DIRECTORY_ID; - ObjectID < max(MaxOldObjectId, MaxNewObjectId); + ObjectID < std::max(MaxOldObjectId, MaxNewObjectId); ObjectID++) { typedef BackupStoreRefCountDatabase::refcount_t refcount_t; |