diff options
author | mostynb@opera.com <mostynb@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-14 22:50:32 +0000 |
---|---|---|
committer | mostynb@opera.com <mostynb@opera.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-14 22:50:32 +0000 |
commit | 915cc7dafb8a69df345325c2388ec0d5b66239cf (patch) | |
tree | c9ff186c089ddc74f9766220b7b07942b2b9fa60 /base/pickle.h | |
parent | c2d8241ecb4b0667bdfc6273f97b237ab1b0862c (diff) | |
download | chromium_src-915cc7dafb8a69df345325c2388ec0d5b66239cf.zip chromium_src-915cc7dafb8a69df345325c2388ec0d5b66239cf.tar.gz chromium_src-915cc7dafb8a69df345325c2388ec0d5b66239cf.tar.bz2 |
add double support to base::Pickle
Since WebTimeRange now uses doubles instead of floats[1], we should
probably add double support to base::Pickle.
[1] https://codereview.chromium.org/337923006
BUG=393552
Review URL: https://codereview.chromium.org/388213002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283064 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/pickle.h')
-rw-r--r-- | base/pickle.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/base/pickle.h b/base/pickle.h index 2e3cd36..99add5e 100644 --- a/base/pickle.h +++ b/base/pickle.h @@ -36,6 +36,7 @@ class BASE_EXPORT PickleIterator { bool ReadInt64(int64* result) WARN_UNUSED_RESULT; bool ReadUInt64(uint64* result) WARN_UNUSED_RESULT; bool ReadFloat(float* result) WARN_UNUSED_RESULT; + bool ReadDouble(double* result) WARN_UNUSED_RESULT; bool ReadString(std::string* result) WARN_UNUSED_RESULT; bool ReadWString(std::wstring* result) WARN_UNUSED_RESULT; bool ReadString16(base::string16* result) WARN_UNUSED_RESULT; @@ -175,6 +176,10 @@ class BASE_EXPORT Pickle { float* result) const WARN_UNUSED_RESULT { return iter->ReadFloat(result); } + bool ReadDouble(PickleIterator* iter, + double* result) const WARN_UNUSED_RESULT { + return iter->ReadDouble(result); + } bool ReadString(PickleIterator* iter, std::string* result) const WARN_UNUSED_RESULT { return iter->ReadString(result); @@ -246,6 +251,9 @@ class BASE_EXPORT Pickle { bool WriteFloat(float value) { return WritePOD(value); } + bool WriteDouble(double value) { + return WritePOD(value); + } bool WriteString(const std::string& value); bool WriteWString(const std::wstring& value); bool WriteString16(const base::string16& value); |