Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1494)

Unified Diff: Source/platform/SharedBuffer.cpp

Issue 511333002: Removing "using" declarations that import names in the C++ Standard library.(Source/platform/audio) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/DateComponents.cpp ('k') | Source/platform/ThreadTimers.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/SharedBuffer.cpp
diff --git a/Source/platform/SharedBuffer.cpp b/Source/platform/SharedBuffer.cpp
index ab4b74784c2ea97080f5fad7a71eb89cb08dc890..f6cf3dc50d0e9f6b4dff0f2da99192fdeadd1e54 100644
--- a/Source/platform/SharedBuffer.cpp
+++ b/Source/platform/SharedBuffer.cpp
@@ -37,8 +37,6 @@
#include "wtf/MainThread.h"
#endif
-using namespace std;
-
namespace blink {
static const unsigned segmentSize = 0x1000;
@@ -266,7 +264,7 @@ void SharedBuffer::append(const char* data, unsigned length)
segment = m_segments.last() + positionInSegment;
unsigned segmentFreeSpace = segmentSize - positionInSegment;
- unsigned bytesToCopy = min(length, segmentFreeSpace);
+ unsigned bytesToCopy = std::min(length, segmentFreeSpace);
for (;;) {
memcpy(segment, data, bytesToCopy);
@@ -277,7 +275,7 @@ void SharedBuffer::append(const char* data, unsigned length)
data += bytesToCopy;
segment = allocateSegment();
m_segments.append(segment);
- bytesToCopy = min(length, segmentSize);
+ bytesToCopy = std::min(length, segmentSize);
}
}
@@ -321,7 +319,7 @@ void SharedBuffer::mergeSegmentsIntoBuffer() const
m_buffer.reserveCapacity(m_size);
unsigned bytesLeft = m_size - bufferSize;
for (unsigned i = 0; i < m_segments.size(); ++i) {
- unsigned bytesToCopy = min(bytesLeft, segmentSize);
+ unsigned bytesToCopy = std::min(bytesLeft, segmentSize);
m_buffer.append(m_segments[i], bytesToCopy);
bytesLeft -= bytesToCopy;
freeSegment(m_segments[i]);
@@ -352,7 +350,7 @@ unsigned SharedBuffer::getSomeData(const char*& someData, unsigned position) con
unsigned segment = segmentIndex(position);
if (segment < segments) {
unsigned bytesLeft = totalSize - consecutiveSize;
- unsigned segmentedSize = min(maxSegmentedSize, bytesLeft);
+ unsigned segmentedSize = std::min(maxSegmentedSize, bytesLeft);
unsigned positionInSegment = offsetInSegment(position);
someData = m_segments[segment] + positionInSegment;
« no previous file with comments | « Source/platform/DateComponents.cpp ('k') | Source/platform/ThreadTimers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698