mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Constify InspectorPackagerConnection members that are immutable (#42366)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42366 Changelog: [Internal] Just codifying the constness of some members. Reviewed By: hoxyq Differential Revision: D52786333 fbshipit-source-id: 772c6f91c50f9b67cabf347300af4da6b42ca2e0
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a064a2a05e
commit
c9b493bc72
@@ -26,7 +26,7 @@ class RCTCxxInspectorPackagerConnectionDelegate
|
||||
virtual ~WebSocket() override;
|
||||
|
||||
private:
|
||||
RCTCxxInspectorWebSocketAdapter* _adapter;
|
||||
RCTCxxInspectorWebSocketAdapter* const _adapter;
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ class JCxxInspectorPackagerConnectionWebSocketDelegate
|
||||
|
||||
private:
|
||||
friend HybridBase;
|
||||
std::weak_ptr<IWebSocketDelegate> cxxDelegate_;
|
||||
const std::weak_ptr<IWebSocketDelegate> cxxDelegate_;
|
||||
};
|
||||
|
||||
} // namespace facebook::react::jsinspector_modern
|
||||
|
||||
@@ -50,7 +50,7 @@ class InspectorPackagerConnection {
|
||||
class Impl;
|
||||
class RemoteConnectionImpl;
|
||||
|
||||
std::shared_ptr<Impl> impl_;
|
||||
const std::shared_ptr<Impl> impl_;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+6
-5
@@ -76,9 +76,9 @@ class InspectorPackagerConnection::Impl
|
||||
// IPageStatusListener methods
|
||||
virtual void onPageRemoved(int pageId) override;
|
||||
|
||||
std::string url_;
|
||||
std::string app_;
|
||||
std::unique_ptr<InspectorPackagerConnectionDelegate> delegate_;
|
||||
const std::string url_;
|
||||
const std::string app_;
|
||||
const std::unique_ptr<InspectorPackagerConnectionDelegate> delegate_;
|
||||
|
||||
std::unordered_map<std::string, std::unique_ptr<ILocalConnection>>
|
||||
inspectorConnections_;
|
||||
@@ -102,8 +102,9 @@ class InspectorPackagerConnection::RemoteConnectionImpl
|
||||
void onDisconnect() override;
|
||||
|
||||
private:
|
||||
std::weak_ptr<InspectorPackagerConnection::Impl> owningPackagerConnection_;
|
||||
std::string pageId_;
|
||||
const std::weak_ptr<InspectorPackagerConnection::Impl>
|
||||
owningPackagerConnection_;
|
||||
const std::string pageId_;
|
||||
};
|
||||
|
||||
} // namespace facebook::react::jsinspector_modern
|
||||
|
||||
@@ -63,7 +63,7 @@ class MockLocalConnection : public ILocalConnection {
|
||||
MOCK_METHOD(void, disconnect, (), (override));
|
||||
|
||||
private:
|
||||
std::unique_ptr<IRemoteConnection> remoteConnection_;
|
||||
const std::unique_ptr<IRemoteConnection> remoteConnection_;
|
||||
};
|
||||
|
||||
class MockInspectorPackagerConnectionDelegate
|
||||
|
||||
Reference in New Issue
Block a user