From e340011d211618884ab85e1245c4b2f2e175c48e Mon Sep 17 00:00:00 2001 From: Erwin Nindl Date: Wed, 12 Sep 2007 12:14:11 +0000 Subject: removed overloaded std::ostream& << operator because of problems with stdc++ library --- buffer.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'buffer.cpp') diff --git a/buffer.cpp b/buffer.cpp index 808f639..6d16467 100644 --- a/buffer.cpp +++ b/buffer.cpp @@ -30,8 +30,8 @@ #include #include -#include #include +#include #include "datatypes.h" #include "buffer.h" @@ -165,15 +165,13 @@ Buffer::operator u_int8_t*() // just for write/read tun return buf_; } -std::ostream& operator<<(std::ostream& output, const Buffer &src) +void Buffer::printHexDump() const { - char buf[10]; + char text[10]; - for( u_int32_t index = 0; index < src.getLength(); index++ ) + for( u_int32_t index = 0; index < length_; index++ ) { - std::sprintf(buf, "%#x", src[index]); - output << buf << " "; + std::sprintf(text, "%#x", buf_[index]); + std::cout << text << " "; } - - return output; } -- cgit v1.2.3