Skip to content

Commit

Permalink
[Compiler Fix] Backport - Bring declarations and definitions to be in…
Browse files Browse the repository at this point in the history
… sync (#32911) (#32915)

<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->




<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
  • Loading branch information
yashykt committed Apr 21, 2023
1 parent d299f5e commit 1fb5296
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
15 changes: 5 additions & 10 deletions src/core/ext/gcp/metadata_query.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,11 @@ namespace grpc_core {

TraceFlag grpc_metadata_query_trace(false, "metadata_query");

constexpr const char MetadataQuery::kZoneAttribute[] =
"/computeMetadata/v1/instance/zone";
constexpr const char MetadataQuery::kClusterNameAttribute[] =
"/computeMetadata/v1/instance/attributes/cluster-name";
constexpr const char MetadataQuery::kRegionAttribute[] =
"/computeMetadata/v1/instance/region";
constexpr const char MetadataQuery::kInstanceIdAttribute[] =
"/computeMetadata/v1/instance/id";
constexpr const char MetadataQuery::kIPv6Attribute[] =
"/computeMetadata/v1/instance/network-interfaces/0/ipv6s";
constexpr const char MetadataQuery::kZoneAttribute[];
constexpr const char MetadataQuery::kClusterNameAttribute[];
constexpr const char MetadataQuery::kRegionAttribute[];
constexpr const char MetadataQuery::kInstanceIdAttribute[];
constexpr const char MetadataQuery::kIPv6Attribute[];

MetadataQuery::MetadataQuery(
std::string attribute, grpc_polling_entity* pollent,
Expand Down
15 changes: 10 additions & 5 deletions src/core/ext/gcp/metadata_query.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,16 @@ namespace grpc_core {
// environment.
class MetadataQuery : public InternallyRefCounted<MetadataQuery> {
public:
static const char kZoneAttribute[];
static const char kClusterNameAttribute[];
static const char kRegionAttribute[];
static const char kInstanceIdAttribute[];
static const char kIPv6Attribute[];
static constexpr const char kZoneAttribute[] =
"/computeMetadata/v1/instance/zone";
static constexpr const char kClusterNameAttribute[] =
"/computeMetadata/v1/instance/attributes/cluster-name";
static constexpr const char kRegionAttribute[] =
"/computeMetadata/v1/instance/region";
static constexpr const char kInstanceIdAttribute[] =
"/computeMetadata/v1/instance/id";
static constexpr const char kIPv6Attribute[] =
"/computeMetadata/v1/instance/network-interfaces/0/ipv6s";

MetadataQuery(
std::string attribute, grpc_polling_entity* pollent,
Expand Down
8 changes: 4 additions & 4 deletions src/core/lib/event_engine/event_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
namespace grpc_event_engine {
namespace experimental {

constexpr EventEngine::TaskHandle EventEngine::TaskHandle::kInvalid = {-1, -1};
constexpr EventEngine::ConnectionHandle
EventEngine::ConnectionHandle::kInvalid = {-1, -1};
constexpr EventEngine::DNSResolver::LookupTaskHandle
const EventEngine::TaskHandle EventEngine::TaskHandle::kInvalid = {-1, -1};
const EventEngine::ConnectionHandle EventEngine::ConnectionHandle::kInvalid = {
-1, -1};
const EventEngine::DNSResolver::LookupTaskHandle
EventEngine::DNSResolver::LookupTaskHandle::kInvalid = {-1, -1};

bool operator==(const EventEngine::TaskHandle& lhs,
Expand Down

0 comments on commit 1fb5296

Please sign in to comment.