hunyadi-dev commented on a change in pull request #979:
URL: https://github.com/apache/nifi-minifi-cpp/pull/979#discussion_r584702478
##########
File path: extensions/mqtt/processors/PublishMQTT.h
##########
@@ -79,7 +79,7 @@ class PublishMQTT : public processors::AbstractMQTTProcessor {
if (flow_size_ < max_seg_size_)
max_seg_size_ = flow_size_;
std::vector<unsigned char> buffer;
- buffer.reserve(max_seg_size_);
+ buffer.resize(max_seg_size_);
Review comment:
Does this change belong here?
If so, moving this to the constructor is more optimal:
```c++
std::vector<unsigned char> buffer(max_seg_size_);
```
----------------------------------------------------------------
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]