diff options
author | Lee Clagett <code@leeclagett.com> | 2021-01-24 07:42:57 +0000 |
---|---|---|
committer | Lee Clagett <code@leeclagett.com> | 2021-01-23 06:23:39 +0000 |
commit | 08e4497c6e3b3f434c0bb255c3942648f153fe66 (patch) | |
tree | 2564f4214e9e66b2dc03ce3c788bb080b963be56 /src/serialization/pair.h | |
parent | Merge pull request #7669 (diff) | |
download | monero-08e4497c6e3b3f434c0bb255c3942648f153fe66.tar.xz |
Improve cryptonote (block and tx) binary read performance
Diffstat (limited to 'src/serialization/pair.h')
-rw-r--r-- | src/serialization/pair.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/serialization/pair.h b/src/serialization/pair.h index 44aafa04d..2d9a89242 100644 --- a/src/serialization/pair.h +++ b/src/serialization/pair.h @@ -69,19 +69,19 @@ inline bool do_serialize(Archive<false>& ar, std::pair<F,S>& p) { size_t cnt; ar.begin_array(cnt); - if (!ar.stream().good()) + if (!ar.good()) return false; if (cnt != 2) return false; if (!::serialization::detail::serialize_pair_element(ar, p.first)) return false; - if (!ar.stream().good()) + if (!ar.good()) return false; ar.delimit_array(); if (!::serialization::detail::serialize_pair_element(ar, p.second)) return false; - if (!ar.stream().good()) + if (!ar.good()) return false; ar.end_array(); @@ -92,16 +92,16 @@ template <template <bool> class Archive, class F, class S> inline bool do_serialize(Archive<true>& ar, std::pair<F,S>& p) { ar.begin_array(2); - if (!ar.stream().good()) + if (!ar.good()) return false; if(!::serialization::detail::serialize_pair_element(ar, p.first)) return false; - if (!ar.stream().good()) + if (!ar.good()) return false; ar.delimit_array(); if(!::serialization::detail::serialize_pair_element(ar, p.second)) return false; - if (!ar.stream().good()) + if (!ar.good()) return false; ar.end_array(); return true; |