Skip to content

Commit

Permalink
replace char* by std::vector<char> in Comparator
Browse files Browse the repository at this point in the history
issue #31
  • Loading branch information
Valentin Noel committed Dec 10, 2013
1 parent eb57237 commit bc4a3ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/Comparator/src/Comparator/Comparator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void Comparator::check( spec_reader::Specification& spec, file_reader::FileReade
element_checker::Checker checker;
size_t size = checker.getSize( element );

char buffer1[ size ];
std::vector< char > buffer1;
if( ! file.readData( buffer1, size ) )
throw std::runtime_error( "[comparator] End of file, cannot read data" );
element->set( buffer1, size );
Expand Down Expand Up @@ -62,7 +62,7 @@ void Comparator::check( spec_reader::Specification& spec, file_reader::FileReade
break;
}

char buffer[ size ];
std::vector< char > buffer;
if( ! file.readData( buffer, size ) )
throw std::runtime_error( "[comparator] End of file, cannot read data" );
element->set( buffer, size );
Expand Down

0 comments on commit bc4a3ba

Please sign in to comment.