summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-11-12 14:42:14 +0100
committerDaniel Friesel <derf@finalrewind.org>2018-11-12 14:42:14 +0100
commit99b66c9c933af61e05ae59122491d5aadea52734 (patch)
treec0b038338c5ba58a72814890aa068316b1044fff
parentee720ed3bcc18fad43127d27e9d57781ecc91393 (diff)
xdrstream: use more descriptive template arg name
-rw-r--r--include/object/xdrstream.h4
-rw-r--r--src/os/object/xdrstream.cc8
2 files changed, 6 insertions, 6 deletions
diff --git a/include/object/xdrstream.h b/include/object/xdrstream.h
index 432f952..2e46cad 100644
--- a/include/object/xdrstream.h
+++ b/include/object/xdrstream.h
@@ -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);
diff --git a/src/os/object/xdrstream.cc b/src/os/object/xdrstream.cc
index d7a5ace..92de986 100644
--- a/src/os/object/xdrstream.cc
+++ b/src/os/object/xdrstream.cc
@@ -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){