From 7da0e9e3fcc0e3a08af49ae16bb82cecaf160560 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20D=C3=B6rre?= Date: Sat, 31 Jan 2015 03:27:13 +0100 Subject: [PATCH] upd: Make testcases cppcheck-compliant --- test/src/slipBioTest.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/src/slipBioTest.cpp b/test/src/slipBioTest.cpp index d579eb3..8f967de 100644 --- a/test/src/slipBioTest.cpp +++ b/test/src/slipBioTest.cpp @@ -12,15 +12,12 @@ class OpensslBIOVector : public OpensslBIO { private: - std::vector>::iterator it, end; std::vector> input; + std::vector>::iterator it, end; public: std::vector> result = std::vector>(); - OpensslBIOVector( std::vector> data ) { - input = data; - it = input.begin(); - end = input.end(); + OpensslBIOVector( std::vector> data ) : input( data ), it( input.begin() ), end( input.end() ) { } int write( const char* buf, int num ); @@ -46,7 +43,7 @@ int OpensslBIOVector::read( char* buf, int size ) { std::copy( it->begin(), it->end(), buf ); auto result = it->size(); - it++; + ++it; return result; } -- 2.39.2