diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-08-10 22:53:46 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-08-11 08:16:35 +0200 |
commit | 84bf981a4fdf94cae40dd199762dc03d681618fe (patch) | |
tree | feef673c747f405b7d5cd42c1a59a34af5e947fa /include/tools | |
parent | 0ff5eb97b89f89e770d4397bf76f24fb7cd76b57 (diff) |
Deduplicate number read/write
Change-Id: I58808e208ac8b3406497a4e512ec3372434d2ed3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120246
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/tools')
-rw-r--r-- | include/tools/stream.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx index e99d41c8ac45..884b95f07290 100644 --- a/include/tools/stream.hxx +++ b/include/tools/stream.hxx @@ -409,6 +409,9 @@ public: bool good() const { return !(eof() || bad()); } private: + template <typename T> SvStream& ReadNumber(T& r); + template <typename T> SvStream& WriteNumber(T n); + template<typename T> void readNumberWithoutSwap(T& rDataDest) { readNumberWithoutSwap_(&rDataDest, sizeof(rDataDest)); } |