Mark the definitions of constinit variables as constinit. (#30339)

This is necessary to compile with --std=c++20.

Bug: chromium:1284275
pull/30338/head
pkasting 2 years ago committed by GitHub
parent e0581db977
commit 38f34c0512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/core/ext/transport/binder/wire_format/binder_constants.cc
  2. 16
      src/core/ext/transport/binder/wire_format/transaction.cc

@ -18,12 +18,12 @@
#include "src/core/ext/transport/binder/wire_format/binder_constants.h"
const int FIRST_CALL_TRANSACTION = 0x00000001;
const int LAST_CALL_TRANSACTION = 0x00FFFFFF;
ABSL_CONST_INIT const int FIRST_CALL_TRANSACTION = 0x00000001;
ABSL_CONST_INIT const int LAST_CALL_TRANSACTION = 0x00FFFFFF;
namespace grpc_binder {
const int kFirstCallId = FIRST_CALL_TRANSACTION + 1000;
ABSL_CONST_INIT const int kFirstCallId = FIRST_CALL_TRANSACTION + 1000;
} // namespace grpc_binder
#endif

@ -20,14 +20,14 @@
namespace grpc_binder {
const int kFlagPrefix = 0x1;
const int kFlagMessageData = 0x2;
const int kFlagSuffix = 0x4;
const int kFlagOutOfBandClose = 0x8;
const int kFlagExpectSingleMessage = 0x10;
const int kFlagStatusDescription = 0x20;
const int kFlagMessageDataIsParcelable = 0x40;
const int kFlagMessageDataIsPartial = 0x80;
ABSL_CONST_INIT const int kFlagPrefix = 0x1;
ABSL_CONST_INIT const int kFlagMessageData = 0x2;
ABSL_CONST_INIT const int kFlagSuffix = 0x4;
ABSL_CONST_INIT const int kFlagOutOfBandClose = 0x8;
ABSL_CONST_INIT const int kFlagExpectSingleMessage = 0x10;
ABSL_CONST_INIT const int kFlagStatusDescription = 0x20;
ABSL_CONST_INIT const int kFlagMessageDataIsParcelable = 0x40;
ABSL_CONST_INIT const int kFlagMessageDataIsPartial = 0x80;
} // namespace grpc_binder
#endif

Loading…
Cancel
Save