From 4cdaefdf38f0735d57cb5942d588cd6f39397e37 Mon Sep 17 00:00:00 2001 From: zxu Date: Tue, 22 May 2018 10:45:03 -0400 Subject: fix build for Firestore copybara import (#1308) * fix "target of using declaration conflicts with declaration already in scope" * fix "call to implicitly-deleted copy constructor of *unique_ptr*" --- Firestore/core/src/firebase/firestore/geo_point.cc | 6 ++---- Firestore/core/src/firebase/firestore/remote/serializer.cc | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'Firestore/core/src') diff --git a/Firestore/core/src/firebase/firestore/geo_point.cc b/Firestore/core/src/firebase/firestore/geo_point.cc index 1ed5126..5aae156 100644 --- a/Firestore/core/src/firebase/firestore/geo_point.cc +++ b/Firestore/core/src/firebase/firestore/geo_point.cc @@ -20,8 +20,6 @@ #include "Firestore/core/src/firebase/firestore/util/firebase_assert.h" -using std::isnan; - namespace firebase { namespace firestore { @@ -31,11 +29,11 @@ GeoPoint::GeoPoint() : GeoPoint(0, 0) { GeoPoint::GeoPoint(double latitude, double longitude) : latitude_(latitude), longitude_(longitude) { FIREBASE_ASSERT_MESSAGE_WITH_EXPRESSION( - !isnan(latitude) && -90 <= latitude && latitude <= 90, + !std::isnan(latitude) && -90 <= latitude && latitude <= 90, -90 <= latitude && latitude <= 90, "Latitude must be in the range of [-90, 90]"); FIREBASE_ASSERT_MESSAGE_WITH_EXPRESSION( - !isnan(longitude) && -180 <= longitude && longitude <= 180, + !std::isnan(longitude) && -180 <= longitude && longitude <= 180, -180 <= longitude && longitude <= 180, "Latitude must be in the range of [-180, 180]"); } diff --git a/Firestore/core/src/firebase/firestore/remote/serializer.cc b/Firestore/core/src/firebase/firestore/remote/serializer.cc index 2ed5f54..26a06c6 100644 --- a/Firestore/core/src/firebase/firestore/remote/serializer.cc +++ b/Firestore/core/src/firebase/firestore/remote/serializer.cc @@ -485,7 +485,7 @@ Serializer::DecodeMaybeDocument(const uint8_t* bytes, size_t length) const { DecodeBatchGetDocumentsResponse(&reader); if (reader.status().ok()) { - return maybeDoc; + return std::move(maybeDoc); } else { return reader.status(); } -- cgit v1.2.3