From ff5cca72f077dea1a4ae927dff82acbe939b1261 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 12 Nov 2018 15:49:53 +0100 Subject: XDR: Use stdint types for now --- include/object/xdrstream.h | 16 +++++++--------- src/os/object/xdrstream.cc | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/include/object/xdrstream.h b/include/object/xdrstream.h index 2e46cad..497e143 100644 --- a/include/object/xdrstream.h +++ b/include/object/xdrstream.h @@ -21,16 +21,14 @@ class XDRStream { XDRStream & operator<<(char c); XDRStream & operator<<(unsigned char c); - XDRStream & operator<<(unsigned short number); - XDRStream & operator<<(short number); - XDRStream & operator<<(unsigned int number); - XDRStream & operator<<(int number); - XDRStream & operator<<(unsigned long number); - XDRStream & operator<<(long number); - XDRStream & operator<<(unsigned long long number); - XDRStream & operator<<(long long number); + XDRStream & operator<<(uint16_t number); + XDRStream & operator<<(int16_t number); + XDRStream & operator<<(uint32_t number); + XDRStream & operator<<(int32_t number); + XDRStream & operator<<(uint64_t number); + XDRStream & operator<<(int64_t number); XDRStream & operator<<(char const *text); - template XDRStream & operator<<(char const (&text)[TSize]); + template XDRStream & operator<<(char const (&text)[TSize]); XDRStream & operator<<(XDRStream & (*fun) (XDRStream &)); }; diff --git a/src/os/object/xdrstream.cc b/src/os/object/xdrstream.cc index 92de986..bc2ad89 100644 --- a/src/os/object/xdrstream.cc +++ b/src/os/object/xdrstream.cc @@ -82,7 +82,7 @@ XDRStream & XDRStream::operator<<(char const *data){ return *this; } -template +template XDRStream & XDRStream::operator<<(char const (&data)[TSize]){ if (!is_fixed_length) { *this << TSize; -- cgit v1.2.3