diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-12-30 14:54:55 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-12-30 14:54:55 +0000 |
commit | f5a529cfd4a9f1920c0b1d75375258dab2d71be1 (patch) | |
tree | 83028df92c92eae6557bf6bfecb943a8ca9c8df9 /lib/backupclient | |
parent | a5400afe73492cbb8e0049a7facb2b32f0fcad04 (diff) |
Rename NDEBUG flag to BOX_RELEASE_BUILD, as other projects use NDEBUG as
well (e.g. wxWidgets) and it causes conflicts which are difficult to
resolve.
Diffstat (limited to 'lib/backupclient')
-rw-r--r-- | lib/backupclient/BackupStoreFile.h | 2 | ||||
-rw-r--r-- | lib/backupclient/BackupStoreFileDiff.cpp | 20 | ||||
-rw-r--r-- | lib/backupclient/BackupStoreFileEncodeStream.cpp | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/lib/backupclient/BackupStoreFile.h b/lib/backupclient/BackupStoreFile.h index d7a71318..7bd75fa5 100644 --- a/lib/backupclient/BackupStoreFile.h +++ b/lib/backupclient/BackupStoreFile.h @@ -215,7 +215,7 @@ public: static BackupStoreFileStats msStats; // For debug -#ifndef NDEBUG +#ifndef BOX_RELEASE_BUILD static bool TraceDetailsOfDiffProcess; #endif diff --git a/lib/backupclient/BackupStoreFileDiff.cpp b/lib/backupclient/BackupStoreFileDiff.cpp index da0324fd..87cf7cff 100644 --- a/lib/backupclient/BackupStoreFileDiff.cpp +++ b/lib/backupclient/BackupStoreFileDiff.cpp @@ -40,7 +40,7 @@ using namespace BackupStoreFileCreation; // By default, don't trace out details of the diff as we go along -- would fill up logs significantly. // But it's useful for the test. -#ifndef NDEBUG +#ifndef BOX_RELEASE_BUILD bool BackupStoreFile::TraceDetailsOfDiffProcess = false; #endif @@ -436,7 +436,7 @@ static void FindMostUsedSizes(BlocksAvailableEntry *pIndex, int64_t NumBlocks, i } // trace the size table in debug builds -#ifndef NDEBUG +#ifndef BOX_RELEASE_BUILD if(BackupStoreFile::TraceDetailsOfDiffProcess) { for(int t = 0; t < BACKUP_FILE_DIFF_MAX_BLOCK_SIZES; ++t) @@ -728,7 +728,7 @@ static void SearchForMatchingBlocks(IOStream &rFile, std::map<int64_t, int64_t> throw; } -#ifndef NDEBUG +#ifndef BOX_RELEASE_BUILD if(BackupStoreFile::TraceDetailsOfDiffProcess) { // Trace out the found blocks in debug mode @@ -810,7 +810,7 @@ static bool SecondStageMatch(BlocksAvailableEntry *pFirstInHashList, RollingChec ASSERT(pFirstInHashList != 0); ASSERT(pIndex != 0); -#ifndef NDEBUG +#ifndef BOX_RELEASE_BUILD uint16_t DEBUG_Hash = fastSum.GetComponentForHashing(); #endif uint32_t Checksum = fastSum.GetChecksum(); @@ -916,7 +916,7 @@ static void GenerateRecipe(BackupStoreFileEncodeStream::Recipe &rRecipe, BlocksA instruction.mSpaceBefore = SizeOfInputFile; rRecipe.push_back(instruction); - #ifndef NDEBUG + #ifndef BOX_RELEASE_BUILD if(BackupStoreFile::TraceDetailsOfDiffProcess) { BOX_TRACE("Diff: Default recipe generated, " << @@ -936,7 +936,7 @@ static void GenerateRecipe(BackupStoreFileEncodeStream::Recipe &rRecipe, BlocksA ASSERT(i != rFoundBlocks.end()); // check logic // Counting for debug tracing -#ifndef NDEBUG +#ifndef BOX_RELEASE_BUILD int64_t debug_NewBytesFound = 0; int64_t debug_OldBlocksUsed = 0; #endif @@ -963,7 +963,7 @@ static void GenerateRecipe(BackupStoreFileEncodeStream::Recipe &rRecipe, BlocksA instruction.mSpaceBefore = i->first - loc; // Move location forward to match loc += instruction.mSpaceBefore; -#ifndef NDEBUG +#ifndef BOX_RELEASE_BUILD debug_NewBytesFound += instruction.mSpaceBefore; #endif } @@ -989,7 +989,7 @@ static void GenerateRecipe(BackupStoreFileEncodeStream::Recipe &rRecipe, BlocksA instruction.mBlocks += 1; } -#ifndef NDEBUG +#ifndef BOX_RELEASE_BUILD debug_OldBlocksUsed++; #endif @@ -1005,14 +1005,14 @@ static void GenerateRecipe(BackupStoreFileEncodeStream::Recipe &rRecipe, BlocksA { RESET_INSTRUCTION instruction.mSpaceBefore = SizeOfInputFile - loc; -#ifndef NDEBUG +#ifndef BOX_RELEASE_BUILD debug_NewBytesFound += instruction.mSpaceBefore; #endif rRecipe.push_back(instruction); } // dump out the recipe -#ifndef NDEBUG +#ifndef BOX_RELEASE_BUILD BOX_TRACE("Diff: " << debug_NewBytesFound << " new bytes found, " << debug_OldBlocksUsed << " old blocks used"); diff --git a/lib/backupclient/BackupStoreFileEncodeStream.cpp b/lib/backupclient/BackupStoreFileEncodeStream.cpp index 3b45e6c0..b2d44697 100644 --- a/lib/backupclient/BackupStoreFileEncodeStream.cpp +++ b/lib/backupclient/BackupStoreFileEncodeStream.cpp @@ -236,7 +236,7 @@ void BackupStoreFileEncodeStream::Setup(const char *Filename, { throw std::bad_alloc(); } -#ifndef NDEBUG +#ifndef BOX_RELEASE_BUILD // In debug builds, make sure that the reallocation code is exercised. mEncodedBuffer.Allocate(mAllocatedBufferSize / 4); #else |