Skip to content
Snippets Groups Projects
Commit 99b66c9c authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

xdrstream: use more descriptive template arg name

parent ee720ed3
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ class XDRStream {
XDRStream & operator<<(unsigned long long number);
XDRStream & operator<<(long long number);
XDRStream & operator<<(char const *text);
template<int N> XDRStream & operator<<(char const (&text)[N]);
template<int TSize> XDRStream & operator<<(char const (&text)[TSize]);
XDRStream & operator<<(XDRStream & (*fun) (XDRStream &));
};
......@@ -41,7 +41,7 @@ XDRStream & flush(XDRStream & os);
// TERM: zero-termination
XDRStream & term(XDRStream & os);
template<int N>
template<int TSize>
XDRStream & opaque(XDRStream & os);
XDRStream & fixed(XDRStream & os);
......
......@@ -82,13 +82,13 @@ XDRStream & XDRStream::operator<<(char const *data){
return *this;
}
template<int N>
XDRStream & XDRStream::operator<<(char const (&data)[N]){
template<int TSize>
XDRStream & XDRStream::operator<<(char const (&data)[TSize]){
if (!is_fixed_length) {
*this << N;
*this << TSize;
}
uint32_t i;
for (i = 0; i < N; i++) {
for (i = 0; i < TSize; i++) {
put(data[i]);
}
while ((i++) % 4 != 0){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment