aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/src/firebase/firestore/model/resource_path.h
diff options
context:
space:
mode:
authorGravatar rsgowman <rgowman@google.com>2018-02-09 12:15:21 -0500
committerGravatar GitHub <noreply@github.com>2018-02-09 12:15:21 -0500
commit274fe52bbf817ef9d35638effb4de08454acfc6d (patch)
treed422177d355315a3314578c8554e4ebc86d1e042 /Firestore/core/src/firebase/firestore/model/resource_path.h
parentecef4aa308c213c000d115123824d55482ffbdad (diff)
cmake build fixes (#770)
* Fix nanopb (in cmake build) Look for binaries in the src dir (since that's where we build now.) This error would be masked if a previous build had completed prior to switching nanopb to build out of src. Also, don't patch the protoc path multiple times. This could be triggered by (eg) 'make && make clean && make'. * Add resource_path.{h,cc} to the cmake build * Fix signed/unsigned int comparison warnings * Ensure FieldValue tag_ is initialized during cp/mv ctor. Otherwise, the assignment operator attempts to deallocate based on the (uninitialized) tag_ variable, posssibly leading to segfaults. * Fix tests that throw exceptions. The (previous) tests checked to ensure that an abort() occurs, but if ABSL_HAVE_EXCEPTIONS is defined on non-macos (which is currently the default) then the assertions will throw a std::logic_error rather than abort()ing. On macos, an exception is thrown too, but the exception doesn't derrive from std::exception, so ASSERT_DEATH_* doesn't catch it (hence why ASSERT_DEATH_* actually works.) To resolve this, I've switched to ASSERT_ANY_THROW.
Diffstat (limited to 'Firestore/core/src/firebase/firestore/model/resource_path.h')
-rw-r--r--Firestore/core/src/firebase/firestore/model/resource_path.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Firestore/core/src/firebase/firestore/model/resource_path.h b/Firestore/core/src/firebase/firestore/model/resource_path.h
index 481d32f..b0853c6 100644
--- a/Firestore/core/src/firebase/firestore/model/resource_path.h
+++ b/Firestore/core/src/firebase/firestore/model/resource_path.h
@@ -19,6 +19,7 @@
#include <initializer_list>
#include <string>
+#include <utility>
#include "Firestore/core/src/firebase/firestore/model/base_path.h"
#include "absl/strings/string_view.h"
@@ -69,7 +70,7 @@ class ResourcePath : public impl::BasePath<ResourcePath> {
}
private:
- ResourcePath(SegmentsT&& segments) : BasePath{std::move(segments)} {
+ explicit ResourcePath(SegmentsT&& segments) : BasePath{std::move(segments)} {
}
// So that methods of base can construct ResourcePath using the private
@@ -81,4 +82,4 @@ class ResourcePath : public impl::BasePath<ResourcePath> {
} // namespace firestore
} // namespace firebase
-#endif
+#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_MODEL_RESOURCE_PATH_H_