aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/src
diff options
context:
space:
mode:
authorGravatar zxu <zxu@google.com>2018-05-22 10:45:03 -0400
committerGravatar GitHub <noreply@github.com>2018-05-22 10:45:03 -0400
commit4cdaefdf38f0735d57cb5942d588cd6f39397e37 (patch)
tree6981009a3497dc5e96d24381580fdda9ef7ca4bd /Firestore/core/src
parent503d2debdddd85331ce2e8556bbd50d53f3aa19d (diff)
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*"
Diffstat (limited to 'Firestore/core/src')
-rw-r--r--Firestore/core/src/firebase/firestore/geo_point.cc6
-rw-r--r--Firestore/core/src/firebase/firestore/remote/serializer.cc2
2 files changed, 3 insertions, 5 deletions
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();
}