adamdebreceni commented on a change in pull request #1028:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1028#discussion_r601538011
##########
File path: libminifi/test/archive-tests/CompressContentTests.cpp
##########
@@ -41,29 +41,23 @@
#include "processors/PutFile.h"
#include "utils/file/FileUtils.h"
#include "../Utils.h"
+#include "utils/gsl.h"
class ReadCallback: public minifi::InputStreamCallback {
public:
- explicit ReadCallback(size_t size) :
- read_size_(0) {
- buffer_size_ = size;
- buffer_ = new uint8_t[buffer_size_];
- archive_buffer_ = nullptr;
- archive_buffer_size_ = 0;
- }
- ~ReadCallback() {
- if (buffer_)
- delete[] buffer_;
- if (archive_buffer_)
- delete[] archive_buffer_;
- }
- int64_t process(const std::shared_ptr<minifi::io::BaseStream>& stream) {
+ explicit ReadCallback(size_t size)
+ :buffer_size_{size}
Review comment:
minor: a comment warning us that other member initializers depend on
`buffer_size_` might help future readers
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]