Copilot commented on code in PR #533:
URL: https://github.com/apache/pulsar-client-cpp/pull/533#discussion_r2689333366


##########
lib/Synchronized.h:
##########
@@ -41,6 +41,12 @@ class Synchronized {
         return *this;
     }
 
+    Synchronized& operator=(T&& value) {
+        std::lock_guard<std::mutex> lock(mutex_);
+        value_ = value;
+        return *this;
+    }

Review Comment:
   The move assignment operator should use `std::move(value)` instead of just 
`value` to properly move the rvalue reference. Currently, it's performing a 
copy instead of a move, which defeats the purpose of having a move assignment 
operator.



##########
lib/ConsumerImpl.cc:
##########
@@ -235,8 +236,9 @@ Future<Result, bool> ConsumerImpl::connectionOpened(const 
ClientConnectionPtr& c
     // Register consumer so that we can handle other incomming commands (e.g. 
ACTIVE_CONSUMER_CHANGE) after

Review Comment:
   Corrected spelling of 'incomming' to 'incoming'
   ```suggestion
       // Register consumer so that we can handle other incoming commands (e.g. 
ACTIVE_CONSUMER_CHANGE) after
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to