Skip to content

Commit 3e8f141

Browse files
Cameron Evansmeta-codesync[bot]
authored andcommitted
Make ClientMetadataRef::getAgent() const.
Summary: As titled. This method is fine as const. Reviewed By: sazonovkirill Differential Revision: D86169383 fbshipit-source-id: 0b97fa5da09c805c9244e5e487e4876aee08d581
1 parent 2d15af9 commit 3e8f141

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

third-party/thrift/src/thrift/lib/cpp2/server/Cpp2ConnContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ folly::Optional<std::string> Cpp2ConnContext::PeerCred::getError() const {
9595
}
9696
}
9797

98-
std::optional<std::string_view> ClientMetadataRef::getAgent() {
98+
std::optional<std::string_view> ClientMetadataRef::getAgent() const {
9999
if (!md_.agent()) {
100100
return {};
101101
}

third-party/thrift/src/thrift/lib/cpp2/server/Cpp2ConnContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class ClientMetadataRef {
6565
public:
6666
explicit ClientMetadataRef(const ClientMetadata& md) : md_(md) {}
6767
std::optional<std::string_view> getHostname() const;
68-
std::optional<std::string_view> getAgent();
68+
std::optional<std::string_view> getAgent() const;
6969
std::optional<std::string_view> getOtherMetadataField(std::string_view key);
7070
const folly::F14NodeMap<std::string, std::string>& getFields() const;
7171

0 commit comments

Comments
 (0)