szaszm commented on a change in pull request #713: MINIFICPP-1119 unify
win/posix sockets + clean up issues
URL: https://github.com/apache/nifi-minifi-cpp/pull/713#discussion_r377184363
##########
File path: extensions/rocksdb-repos/RocksDbStream.cpp
##########
@@ -28,19 +29,15 @@ namespace nifi {
namespace minifi {
namespace io {
-RocksDbStream::RocksDbStream(const std::string &path, rocksdb::DB *db, bool
write_enable)
+RocksDbStream::RocksDbStream(std::string path, rocksdb::DB *db, bool
write_enable)
: BaseStream(),
- path_(path),
+ path_(std::move(path)),
write_enable_(write_enable),
db_(db),
logger_(logging::LoggerFactory<RocksDbStream>::getLogger()) {
rocksdb::Status status;
status = db_->Get(rocksdb::ReadOptions(), path_, &value_);
- if (status.ok()) {
- exists_ = true;
- } else {
- exists_ = false;
- }
+ exists_ = status.ok();
Review comment:
indeed, will remove
----------------------------------------------------------------
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]
With regards,
Apache Git Services