Bug 786533 - Replace NS_MIN/NS_MAX with std::min/std::max and #include <algorithm> where needed. r=ehsan

This commit is contained in:
Mats Palmgren
2013-01-15 13:22:03 +01:00
parent 9f4749fbb5
commit 7532b4e736
337 changed files with 1739 additions and 1410 deletions

View File

@@ -7,6 +7,7 @@
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/TabChild.h"
#include "mozilla/Util.h"
#include <algorithm>
#ifdef MOZ_LOGGING
// so we can get logging even in release builds (but only for some things)
@@ -2421,8 +2422,8 @@ nsDocShell::HistoryPurged(int32_t aNumEntries)
// eviction. We need to adjust by the number of entries that we
// just purged from history, so that we look at the right session history
// entries during eviction.
mPreviousTransIndex = NS_MAX(-1, mPreviousTransIndex - aNumEntries);
mLoadedTransIndex = NS_MAX(0, mLoadedTransIndex - aNumEntries);
mPreviousTransIndex = std::max(-1, mPreviousTransIndex - aNumEntries);
mLoadedTransIndex = std::max(0, mLoadedTransIndex - aNumEntries);
int32_t count = mChildList.Count();
for (int32_t i = 0; i < count; ++i) {