summaryrefslogtreecommitdiff
path: root/src/convert.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/convert.cc')
-rw-r--r--src/convert.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/convert.cc b/src/convert.cc
index 3af143a..d0ffa81 100644
--- a/src/convert.cc
+++ b/src/convert.cc
@@ -1,8 +1,8 @@
/**
- * @file convert.cc
- * @brief Implementation of miscellaneous convertion functions
- * @author Andreas Aardal Hanssen
- * @date 2002-2005
+ * @file convert.cc
+ * @brief Implementation of miscellaneous convertion functions
+ * @author Andreas Aardal Hanssen
+ * @date 2002-2005
*/
#include "convert.h"
@@ -19,7 +19,7 @@ BincStream::~BincStream()
clear();
}
-string BincStream::popString(unsigned int size)
+string BincStream::popString(size_t size)
{
if (size > nstr.length()) size = nstr.length();
string tmp = nstr.substr(0, size);
@@ -56,9 +56,9 @@ void BincStream::clear()
nstr = "";
}
-unsigned int BincStream::getSize() const
+size_t BincStream::getSize() const
{
- return (unsigned int)nstr.length();
+ return nstr.length();
}
BincStream &BincStream::operator<<(std::ostream &(*)(std::ostream &))
@@ -75,19 +75,19 @@ BincStream &BincStream::operator<<(const string &t)
BincStream &BincStream::operator<<(int t)
{
- nstr += toString(t);
+ nstr += std::to_string(t);
return *this;
}
BincStream &BincStream::operator<<(unsigned long t)
{
- nstr += toString(t);
+ nstr += std::to_string(t);
return *this;
}
BincStream &BincStream::operator<<(unsigned int t)
{
- nstr += toString(t);
+ nstr += std::to_string(t);
return *this;
}