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

Unified Diff: Source/platform/SharedBuffer.cpp

Issue 1290803002: Remove STATIC_CONST_MEMBER_DEFINITION. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 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/SharedBuffer.h ('k') | Tools/Scripts/webkitpy/style/checkers/cpp.py » ('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 a5045b4b779b4c56e1aa81172fa5bd8df793d516..d678a28fa5fb01dac6864ab458504c56fbf71b20 100644
--- a/Source/platform/SharedBuffer.cpp
+++ b/Source/platform/SharedBuffer.cpp
@@ -40,8 +40,6 @@
namespace blink {
-STATIC_CONST_MEMBER_DEFINITION const unsigned SharedBuffer::kSegmentSize;
-
static inline unsigned segmentIndex(unsigned position)
{
return position / SharedBuffer::kSegmentSize;
@@ -271,7 +269,7 @@ void SharedBuffer::append(const char* data, unsigned length)
data += bytesToCopy;
segment = allocateSegment();
m_segments.append(segment);
- bytesToCopy = std::min(length, kSegmentSize);
+ bytesToCopy = std::min(length, static_cast<unsigned>(kSegmentSize));
}
}
@@ -314,7 +312,7 @@ void SharedBuffer::mergeSegmentsIntoBuffer() const
if (m_size > bufferSize) {
unsigned bytesLeft = m_size - bufferSize;
for (unsigned i = 0; i < m_segments.size(); ++i) {
- unsigned bytesToCopy = std::min(bytesLeft, kSegmentSize);
+ unsigned bytesToCopy = std::min(bytesLeft, static_cast<unsigned>(kSegmentSize));
m_buffer.append(m_segments[i], bytesToCopy);
bytesLeft -= bytesToCopy;
freeSegment(m_segments[i]);
« no previous file with comments | « Source/platform/SharedBuffer.h ('k') | Tools/Scripts/webkitpy/style/checkers/cpp.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698