From 8c764b43aed448d09bbb50ef30fa5054ef5efebf Mon Sep 17 00:00:00 2001 From: hai007 Date: Sun, 31 Oct 2021 20:48:04 -0700 Subject: [PATCH] Create definition point for kNsdTypeInfo. Per the standard, this is necessary since the variable is ODR-used, though some compilers will not complain without it because ODR violations do not require a diagnostic. PiperOrigin-RevId: 406741338 --- cpp/platform/base/BUILD | 1 + cpp/platform/base/nsd_service_info.cc | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 cpp/platform/base/nsd_service_info.cc diff --git a/cpp/platform/base/BUILD b/cpp/platform/base/BUILD index fa8f5386..a7cdf16c 100644 --- a/cpp/platform/base/BUILD +++ b/cpp/platform/base/BUILD @@ -21,6 +21,7 @@ cc_library( "base64_utils.cc", "bluetooth_utils.cc", "input_stream.cc", + "nsd_service_info.cc", "prng.cc", ], hdrs = [ diff --git a/cpp/platform/base/nsd_service_info.cc b/cpp/platform/base/nsd_service_info.cc new file mode 100644 index 00000000..e5c401a9 --- /dev/null +++ b/cpp/platform/base/nsd_service_info.cc @@ -0,0 +1,23 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "platform/base/nsd_service_info.h" + +namespace location { +namespace nearby { + +constexpr absl::string_view NsdServiceInfo::kNsdTypeFormat; + +} // namespace nearby +} // namespace location