lordgamez commented on a change in pull request #1035:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1035#discussion_r601302083



##########
File path: nanofi/src/api/nanofi.cpp
##########
@@ -131,20 +131,26 @@ nifi_instance *create_instance_repo(const char *url, 
nifi_port *port, const char
   return instance;
 }
 
+nifi_instance * acquire_standalone_instance () {
+  if (standalone_instance == nullptr) {
+    nifi_port port;
+    auto port_str = 
utils::IdGenerator::getIdGenerator()->generate().to_string();
+    port.port_id = const_cast<char *>(port_str.c_str());

Review comment:
       We could initialize the port here like
   ```
   nifi_port port{const_cast<char *>(port_str.c_str())};
   ```




-- 
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:
us...@infra.apache.org


Reply via email to