[ 
https://issues.apache.org/jira/browse/MINIFICPP-679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16688763#comment-16688763
 ] 

ASF GitHub Bot commented on MINIFICPP-679:
------------------------------------------

Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/442#discussion_r234040428
  
    --- Diff: libminifi/include/core/Core.h ---
    @@ -142,52 +141,30 @@ class CoreComponent {
        * Constructor that sets the name and uuid.
        */
     
    -  explicit CoreComponent(const std::string name, utils::Identifier uuid)
    +  explicit CoreComponent(const std::string &name, utils::Identifier uuid)
           : name_(name) {
         if (uuid == nullptr) {
           // Generate the global UUID for the flow record
           id_generator_->generate(uuid_);
         } else {
           uuid_ = uuid;
         }
    -
         uuidStr_ = uuid_.to_string();
       }
     
    -  explicit CoreComponent(const std::string name)
    +  explicit CoreComponent(const std::string &name)
           : name_(name) {
    -
         // Generate the global UUID for the flow record
         id_generator_->generate(uuid_);
    -
         uuidStr_ = uuid_.to_string();
       }
    -  /*
    -   #ifdef WIN32
    -   #else
    -
    -   explicit CoreComponent(const std::string name, Identifier uuid = 
nullptr)
    -   : name_(name) {
    -   if (nullptr == uuid)
    -   // Generate the global UUID for the flow record
    -   id_generator_->generate(uuid_);
    -   else
    -   uuid_copy(uuid_, uuid);
    -
    -   char uuidStr[37] = { 0 };
    -   uuid_unparse_lower(uuid_, uuidStr);
    -   uuidStr_ = uuidStr;
    -   }
    -   #endif
    -   */
    +
    +  explicit CoreComponent(const CoreComponent &other) = default;
       /**
        * Move Constructor.
        */
    -  explicit CoreComponent(const CoreComponent &&other)
    -      : name_(std::move(other.name_)) {
    -    uuid_ = other.uuid_;
    -    //uuid_copy(uuid_, other.uuid_);
    -  }
    +
    --- End diff --
    
    should be safe since we added a non trial move con to ident, but this will 
require some testing on all platforms. again, still running windows build. Will 
probably report back tomorrow. 


> Improve Const correctness in core and ID
> ----------------------------------------
>
>                 Key: MINIFICPP-679
>                 URL: https://issues.apache.org/jira/browse/MINIFICPP-679
>             Project: NiFi MiNiFi C++
>          Issue Type: Improvement
>            Reporter: Mr TheSegfault
>            Assignee: Mr TheSegfault
>            Priority: Major
>
> Improve Const correctness in core and ID as a way to kick off MINIFICPP-678 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to