Skip to content

Commit c10571b

Browse files
authored
fix: MSVC (windows): Prevent GetCurrentTime macro expansion in windows.
Without this, GetCurrentTime which exists as a macro in Windows is expanded, leading to this compilation error: https://github.com/googleapis/google-cloud-cpp/actions/runs/16149454809/job/45577395445#step:12:3259 This method of fixing this problem is documented and recommended here: https://protobuf.dev/support/migration/#getcurrenttime
1 parent c833e3b commit c10571b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

google/cloud/bigtable/emulator/server.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ class EmulatorTableService final : public btadmin::BigtableTableAdmin::Service {
245245
btadmin::UpdateTableMetadata res_md;
246246
res_md.set_name(request->table().name());
247247
*res_md.mutable_start_time() =
248-
google::protobuf::util::TimeUtil::GetCurrentTime();
248+
(google::protobuf::util::TimeUtil::GetCurrentTime)();
249249
*res_md.mutable_end_time() =
250-
google::protobuf::util::TimeUtil::GetCurrentTime();
250+
(google::protobuf::util::TimeUtil::GetCurrentTime)();
251251
response->set_name("UpdateTable");
252252
response->mutable_metadata()->PackFrom(std::move(res_md));
253253
response->set_done(true);

0 commit comments

Comments
 (0)