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

Unified Diff: Source/core/svg/SVGPathByteStreamSource.h

Issue 130563014: Get rid of the *Byte types used for (de)serializing to SVGPathByteStream (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/core/svg/SVGPathByteStreamBuilder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGPathByteStreamSource.h
diff --git a/Source/core/svg/SVGPathByteStreamSource.h b/Source/core/svg/SVGPathByteStreamSource.h
index c1189bf7e77cde9cde69dac64da0afcaba9f37f9..0875ef796175e507d9e77639d3663c0208173beb 100644
--- a/Source/core/svg/SVGPathByteStreamSource.h
+++ b/Source/core/svg/SVGPathByteStreamSource.h
@@ -55,11 +55,11 @@ private:
#if COMPILER(MSVC)
#pragma warning(disable: 4701)
#endif
- template<typename DataType, typename ByteType>
+ template<typename DataType>
DataType readType()
{
- ByteType data;
- size_t typeSize = sizeof(ByteType);
+ ByteType<DataType> data;
+ size_t typeSize = sizeof(ByteType<DataType>);
for (size_t i = 0; i < typeSize; ++i) {
ASSERT(m_streamCurrent < m_streamEnd);
@@ -70,25 +70,13 @@ private:
return data.value;
}
- bool readFlag()
- {
- return readType<bool, BoolByte>();
- }
-
- float readFloat()
- {
- return readType<float, FloatByte>();
- }
-
- unsigned short readSVGSegmentType()
- {
- return readType<unsigned short, UnsignedShortByte>();
- }
-
+ bool readFlag() { return readType<bool>(); }
+ float readFloat() { return readType<float>(); }
+ unsigned short readSVGSegmentType() { return readType<unsigned short>(); }
FloatPoint readFloatPoint()
{
- float x = readType<float, FloatByte>();
- float y = readType<float, FloatByte>();
+ float x = readType<float>();
+ float y = readType<float>();
return FloatPoint(x, y);
}
« no previous file with comments | « Source/core/svg/SVGPathByteStreamBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698