-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply modernize pass by value #3340
base: main
Are you sure you want to change the base?
Apply modernize pass by value #3340
Conversation
const ReferencePtr& reference, | ||
const Ice::ConnectionIPtr& connection, | ||
bool compress) | ||
FixedRequestHandler::FixedRequestHandler(const ReferencePtr& reference, Ice::ConnectionIPtr connection, bool compress) | ||
: RequestHandler(reference), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No clear why RequestHandler was not updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. This PR's focus is automated updates.
@@ -128,9 +129,9 @@ namespace | |||
} | |||
} | |||
|
|||
ConnectionFlushBatchAsync::ConnectionFlushBatchAsync(const ConnectionIPtr& connection, const InstancePtr& instance) | |||
ConnectionFlushBatchAsync::ConnectionFlushBatchAsync(ConnectionIPtr connection, const InstancePtr& instance) | |||
: OutgoingAsyncBase(instance), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was instance not updated here?
@@ -15,7 +15,9 @@ | |||
# include "TcpAcceptor.h" | |||
# include "TcpConnector.h" | |||
# include "TcpEndpointI.h" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new line here seems odd, is only "TcpEndpointI.h" that should be treated specially the orders should stay alphabetically sorted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed all these extra newlines.
cpp/src/Ice/UdpEndpointI.cpp
Outdated
@@ -12,6 +13,7 @@ | |||
#include "ProtocolInstance.h" | |||
#include "UdpConnector.h" | |||
#include "UdpTransceiver.h" | |||
#include <utility> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in most sources we have a new lien between Ice and other headers, I guess the clang-tidy added those and doesn't know this rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed most of the new include <utility>
@@ -116,7 +117,7 @@ namespace IceDiscovery | |||
class LookupI final : public Lookup, public std::enable_shared_from_this<LookupI> | |||
{ | |||
public: | |||
LookupI(const LocatorRegistryIPtr&, const LookupPrx&, const Ice::PropertiesPtr&); | |||
LookupI(LocatorRegistryIPtr, const LookupPrx&, const Ice::PropertiesPtr&); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LookupPrx should be passed by value and moved.
@@ -110,9 +112,9 @@ BaseSessionI::getGlacier2AdapterIdSet() | |||
return _servantManager->getGlacier2AdapterIdSet(shared_from_this()); | |||
} | |||
|
|||
SessionI::SessionI(const string& id, const shared_ptr<Database>& database, const IceInternal::TimerPtr& timer) | |||
SessionI::SessionI(const string& id, const shared_ptr<Database>& database, IceInternal::TimerPtr timer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess id was not updated by this auto-fix because it is own by the base class, I assume we will get other warnings that allow to easy fix the callers.
Updates using clang-tidy -fix option.
Performance wide I believe there is no change since clang-tidy didn't update the calling sites to
std::move
the argument when possible.