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

Unified Diff: base/pickle.h

Issue 388213002: add double support to base::Pickle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: doc nit fix Created 6 years, 5 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 | « no previous file | base/pickle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/pickle.h
diff --git a/base/pickle.h b/base/pickle.h
index 2e3cd3664f87a702e910333059f22de6846ef92c..99add5eb42dac5b7a68954ca85eac418ce1922a6 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);
« no previous file with comments | « no previous file | base/pickle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698