Skip to content

Commit 101990f

Browse files
authored
Fix clang-tidy warnings from CLion 2020.2 (#6387)
* Fix clang-tidy warnings in FieldValue * Update clang-tidy exclusions for CLion 2020.2
1 parent 9f7301a commit 101990f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Firestore/core/.clang-tidy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# -modernize-use-equals-delete
1818
# GoogleTest generates test classes that use the old idiom of making
1919
# default constructors and operator= private.
20-
Checks: 'bugprone-*,cert-*,-cert-dcl50-cpp,-cert-err58-cpp,google-*,objc-*,readability-*,-readability-else-after-return,-readability-implicit-bool-conversion,misc-*,modernize-*,-modernize-use-equals-default,-modernize-use-equals-delete,clang-diagnostic-*,clang-analyzer-*'
20+
Checks: 'bugprone-*,cert-*,-cert-dcl50-cpp,-cert-err58-cpp,google-*,objc-*,readability-*,-readability-else-after-return,-readability-implicit-bool-conversion,misc-*,modernize-*,-modernize-use-equals-default,-modernize-use-equals-delete,-modernize-use-trailing-return-type,clang-diagnostic-*,clang-analyzer-*'
2121
WarningsAsErrors: ''
2222
HeaderFilterRegex: ''
2323
CheckOptions:

Firestore/core/src/model/field_value.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class FieldValue {
8484

8585
FieldValue();
8686

87-
FieldValue(ObjectValue object); // NOLINT(runtime/explicit)
87+
FieldValue(const ObjectValue& object); // NOLINT(runtime/explicit)
8888

8989
/** Returns the true type for this value. */
9090
Type type() const {
@@ -409,7 +409,7 @@ class FieldValue::ServerTimestamp {
409409
};
410410

411411
// Pretend you can automatically upcast from ObjectValue to FieldValue.
412-
inline FieldValue::FieldValue(ObjectValue object)
412+
inline FieldValue::FieldValue(const ObjectValue& object)
413413
: FieldValue(object.AsFieldValue()) {
414414
}
415415

0 commit comments

Comments
 (0)