X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Fio%2FslipBio.cpp;h=fb3f6c1925cbde5cb499008b1edfcb656fe1883d;hb=3ea4de25c712971a35dbad27d8834d75933daa08;hp=1a7ba04b6a9040a7b3bba3b53f2c0c2804d8fcdc;hpb=b14903fa5cded58b70beb4e84fb0409011b6e7aa;p=cassiopeia.git diff --git a/src/io/slipBio.cpp b/src/io/slipBio.cpp index 1a7ba04..fb3f6c1 100644 --- a/src/io/slipBio.cpp +++ b/src/io/slipBio.cpp @@ -37,27 +37,14 @@ std::string toHex( const char* buf, int len ) { return data; } -SlipBIO::SlipBIO() { - this->buffer = std::vector( BUFFER_SIZE ); - this->decodeTarget = 0; - this->decodePos = 0; - this->rawPos = 0; - this->failed = false; +SlipBIO::SlipBIO() : buffer( std::vector( BUFFER_SIZE ) ), decodeTarget( 0 ), decodePos( 0 ), rawPos( 0 ), failed( false ) { } void SlipBIO::setTarget( std::shared_ptr target ) { this->target = target; } -SlipBIO::SlipBIO( std::shared_ptr target ) { - this->target = target; - - this->buffer = std::vector( BUFFER_SIZE ); - this->decodeTarget = 0; - this->decodePos = 0; - this->rawPos = 0; - - this->failed = false; +SlipBIO::SlipBIO( std::shared_ptr target ) : target( target ), buffer( std::vector( BUFFER_SIZE ) ), decodeTarget( 0 ), decodePos( 0 ), rawPos( 0 ), failed( false ) { } SlipBIO::~SlipBIO() {}