Index: Source/core/fetch/MemoryCache.cpp |
diff --git a/Source/core/fetch/MemoryCache.cpp b/Source/core/fetch/MemoryCache.cpp |
index 2176169c1a991ef96676a85896f598bab5d5f26b..516866a47c2ebd98840f091b2b0eb30112c3971a 100644 |
--- a/Source/core/fetch/MemoryCache.cpp |
+++ b/Source/core/fetch/MemoryCache.cpp |
@@ -41,8 +41,6 @@ |
#include "wtf/TemporaryChange.h" |
#include "wtf/text/CString.h" |
-using namespace std; |
- |
namespace WebCore { |
static MemoryCache* gMemoryCache; |
@@ -149,9 +147,9 @@ Resource* MemoryCache::resourceForURL(const KURL& resourceURL) |
size_t MemoryCache::deadCapacity() const |
{ |
// Dead resource capacity is whatever space is not occupied by live resources, bounded by an independent minimum and maximum. |
- size_t capacity = m_capacity - min(m_liveSize, m_capacity); // Start with available capacity. |
- capacity = max(capacity, m_minDeadCapacity); // Make sure it's above the minimum. |
- capacity = min(capacity, m_maxDeadCapacity); // Make sure it's below the maximum. |
+ size_t capacity = m_capacity - std::min(m_liveSize, m_capacity); // Start with available capacity. |
+ capacity = std::max(capacity, m_minDeadCapacity); // Make sure it's above the minimum. |
+ capacity = std::min(capacity, m_maxDeadCapacity); // Make sure it's below the maximum. |
return capacity; |
} |
@@ -316,7 +314,7 @@ bool MemoryCache::evict(Resource* resource) |
MemoryCache::LRUList* MemoryCache::lruListFor(Resource* resource) |
{ |
- unsigned accessCount = max(resource->accessCount(), 1U); |
+ unsigned accessCount = std::max(resource->accessCount(), 1U); |
unsigned queueIndex = WTF::fastLog2(resource->size() / accessCount); |
#ifndef NDEBUG |
resource->m_lruIndex = queueIndex; |