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

Unified Diff: ipc/ipc_message_utils.cc

Issue 382673002: Fixes for re-enabling more MSVC level 4 warnings: misc edition #2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 | « google_apis/gaia/fake_gaia.cc ('k') | jingle/glue/thread_wrapper_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_utils.cc
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index a67c5f5cf9eae33b92bf64e67cab2a348348bf44..f5543ff71496b26fa6af8a116f278fbeab6d9c20 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -567,21 +567,17 @@ void ParamTraits<base::File::Info>::Write(Message* m,
bool ParamTraits<base::File::Info>::Read(const Message* m,
PickleIterator* iter,
param_type* p) {
- double last_modified;
- double last_accessed;
- double creation_time;
- bool result =
- ReadParam(m, iter, &p->size) &&
- ReadParam(m, iter, &p->is_directory) &&
- ReadParam(m, iter, &last_modified) &&
- ReadParam(m, iter, &last_accessed) &&
- ReadParam(m, iter, &creation_time);
- if (result) {
- p->last_modified = base::Time::FromDoubleT(last_modified);
- p->last_accessed = base::Time::FromDoubleT(last_accessed);
- p->creation_time = base::Time::FromDoubleT(creation_time);
- }
- return result;
+ double last_modified, last_accessed, creation_time;
+ if (!ReadParam(m, iter, &p->size) ||
+ !ReadParam(m, iter, &p->is_directory) ||
+ !ReadParam(m, iter, &last_modified) ||
+ !ReadParam(m, iter, &last_accessed) ||
+ !ReadParam(m, iter, &creation_time))
+ return false;
+ p->last_modified = base::Time::FromDoubleT(last_modified);
+ p->last_accessed = base::Time::FromDoubleT(last_accessed);
+ p->creation_time = base::Time::FromDoubleT(creation_time);
+ return true;
}
void ParamTraits<base::File::Info>::Log(const param_type& p,
« no previous file with comments | « google_apis/gaia/fake_gaia.cc ('k') | jingle/glue/thread_wrapper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698