Fix link error when linking exe with core_adapter.dll.

PiperOrigin-RevId: 451885776
This commit is contained in:
hai007
2022-05-30 09:15:09 -07:00
committed by Copybara-Service
parent 0e63917cb6
commit e9d34f4c3f
3 changed files with 11 additions and 5 deletions
+3 -3
View File
@@ -36,17 +36,17 @@ namespace location::nearby {
// Forward declarations
namespace connections {
struct ConnectionListener;
struct ConnectionListenerDeleter {
struct DLL_API ConnectionListenerDeleter {
void operator()(connections::ConnectionListener* p);
};
struct DiscoveryListener;
struct DiscoveryListenerDeleter {
struct DLL_API DiscoveryListenerDeleter {
void operator()(connections::DiscoveryListener* p);
};
struct PayloadListener;
struct PayloadListenerDeleter {
struct DLL_API PayloadListenerDeleter {
void operator()(connections::PayloadListener* p);
};
@@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <string>
#include "connections/clients/windows/strategy_w.h"
namespace location::nearby::windows {
@@ -26,6 +28,8 @@ const StrategyW StrategyW::kP2pPointToPoint{
StrategyW::ConnectionType::kPointToPoint,
StrategyW::TopologyType::kOneToOne};
constexpr StrategyW::StrategyW() : StrategyW(kNone) {}
bool StrategyW::IsNone() const { return *this == kNone; }
bool StrategyW::IsValid() const {
@@ -45,6 +49,8 @@ std::string StrategyW::GetName() const {
return "UNKNOWN";
}
void StrategyW::Clear() { *this = kNone; }
bool operator==(const StrategyW& lhs, const StrategyW& rhs) {
return lhs.connection_type_ == rhs.connection_type_ &&
lhs.topology_type_ == rhs.topology_type_;
+2 -2
View File
@@ -28,7 +28,7 @@ class DLL_API StrategyW {
static const StrategyW kP2pCluster;
static const StrategyW kP2pStar;
static const StrategyW kP2pPointToPoint;
constexpr StrategyW() : StrategyW(kNone) {}
constexpr StrategyW();
constexpr StrategyW(const StrategyW&) = default;
constexpr StrategyW& operator=(const StrategyW&) = default;
@@ -43,7 +43,7 @@ class DLL_API StrategyW {
std::string GetName() const;
// Undefine strategy.
void Clear() { *this = kNone; }
void Clear();
friend bool operator==(const StrategyW& lhs, const StrategyW& rhs);
friend bool operator!=(const StrategyW& lhs, const StrategyW& rhs);