aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/src/firebase/firestore/immutable/sorted_map.h
diff options
context:
space:
mode:
Diffstat (limited to 'Firestore/core/src/firebase/firestore/immutable/sorted_map.h')
-rw-r--r--Firestore/core/src/firebase/firestore/immutable/sorted_map.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Firestore/core/src/firebase/firestore/immutable/sorted_map.h b/Firestore/core/src/firebase/firestore/immutable/sorted_map.h
index 3a50020..21dcfd4 100644
--- a/Firestore/core/src/firebase/firestore/immutable/sorted_map.h
+++ b/Firestore/core/src/firebase/firestore/immutable/sorted_map.h
@@ -25,6 +25,7 @@
#include "Firestore/core/src/firebase/firestore/immutable/sorted_map_iterator.h"
#include "Firestore/core/src/firebase/firestore/immutable/tree_sorted_map.h"
#include "Firestore/core/src/firebase/firestore/util/comparison.h"
+#include "absl/base/attributes.h"
namespace firebase {
namespace firestore {
@@ -166,7 +167,7 @@ class SortedMap : public impl::SortedMapBase {
* @param value The value to associate with the key.
* @return A new dictionary with the added/updated value.
*/
- SortedMap insert(const K& key, const V& value) const {
+ ABSL_MUST_USE_RESULT SortedMap insert(const K& key, const V& value) const {
switch (tag_) {
case Tag::Array:
if (array_.size() >= kFixedSize) {
@@ -193,7 +194,7 @@ class SortedMap : public impl::SortedMapBase {
* @param key The key to remove.
* @return A new map without that value.
*/
- SortedMap erase(const K& key) const {
+ ABSL_MUST_USE_RESULT SortedMap erase(const K& key) const {
switch (tag_) {
case Tag::Array:
return SortedMap{array_.erase(key)};