Skip to content

Commit b645037

Browse files
authored
Fix small compilation and linter issues (#3222)
* remove C++11 library feature from `Timestamp` (which is supposed to be "portable"); * fix return type mismatch (`bool` vs `BOOL`); * removed unused `using` declaration; * fix typo in function name.
1 parent 9da2666 commit b645037

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

Firestore/Example/Tests/API/FSTUserDataConverterTests.mm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
using firebase::firestore::model::ObjectValue;
3737
using firebase::firestore::nanopb::MakeNSData;
3838
using firebase::firestore::testutil::Field;
39-
using firebase::firestore::testutil::WrapObject;
4039

4140
@interface FSTUserDataConverterTests : XCTestCase
4241
@end

Firestore/Source/API/FIRDocumentSnapshot.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ - (id)convertedValue:(FieldValue)value options:(const FieldValueOptions &)option
213213
case FieldValue::Type::Timestamp:
214214
return [self convertedTimestamp:value options:options];
215215
case FieldValue::Type::ServerTimestamp:
216-
return [self convertedServerTimetamp:value options:options];
216+
return [self convertedServerTimestamp:value options:options];
217217
case FieldValue::Type::String:
218218
return util::WrapNSString(value.string_value());
219219
case FieldValue::Type::Blob:
@@ -240,7 +240,8 @@ - (id)convertedTimestamp:(const FieldValue &)value options:(const FieldValueOpti
240240
}
241241
}
242242

243-
- (id)convertedServerTimetamp:(const FieldValue &)value options:(const FieldValueOptions &)options {
243+
- (id)convertedServerTimestamp:(const FieldValue &)value
244+
options:(const FieldValueOptions &)options {
244245
const auto &sts = value.server_timestamp_value();
245246
switch (options.server_timestamp_behavior()) {
246247
case ServerTimestampBehavior::kNone:

Firestore/Source/Core/FSTQuery.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ - (NSString *)canonicalString {
472472
return string;
473473
}
474474

475-
- (BOOL)sortsBeforeDocument:(FSTDocument *)document
475+
- (bool)sortsBeforeDocument:(FSTDocument *)document
476476
usingSortOrder:(NSArray<FSTSortOrder *> *)sortOrder {
477477
HARD_ASSERT(_position.size() <= sortOrder.count,
478478
"FSTIndexPosition has more components than provided sort order.");

Firestore/core/src/firebase/firestore/timestamp.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ namespace firebase {
3131

3232
namespace {
3333

34-
// We pass it by value without std::move.
35-
static_assert(std::is_trivially_copyable<Timestamp>::value,
36-
"Timestamp must be trivially copyable");
37-
3834
constexpr int32_t kNanosPerSecond = 1E9;
3935

4036
/**

0 commit comments

Comments
 (0)