Skip to content

Commit 4a7a99e

Browse files
authored
Fix occurrences of inconsistent parameter names between declaration and definition (#9335)
1 parent d5c336f commit 4a7a99e

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

Firestore/core/src/local/leveldb_key.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,15 +1201,15 @@ std::string LevelDbIndexEntryKey::KeyPrefix() {
12011201
std::string LevelDbIndexEntryKey::Key(int32_t index_id,
12021202
absl::string_view user_id,
12031203
absl::string_view array_value,
1204-
absl::string_view dicrectional_value,
1205-
absl::string_view document_key) {
1204+
absl::string_view directional_value,
1205+
absl::string_view document_name) {
12061206
Writer writer;
12071207
writer.WriteTableName(kIndexEntriesTable);
12081208
writer.WriteIndexId(index_id);
12091209
writer.WriteUserId(user_id);
12101210
writer.WriteIndexArrayValue(array_value);
1211-
writer.WriteIndexDirectionalValue(dicrectional_value);
1212-
writer.WriteDocumentId(document_key);
1211+
writer.WriteIndexDirectionalValue(directional_value);
1212+
writer.WriteDocumentId(document_name);
12131213
writer.WriteTerminator();
12141214
return writer.result();
12151215
}

Firestore/core/src/model/field_index.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ class IndexOffset : public util::Comparable<IndexOffset> {
9595
/** Creates a new offset based on the provided document. */
9696
static IndexOffset FromDocument(const Document& document);
9797

98-
static util::ComparisonResult DocumentCompare(const Document& a,
99-
const Document& b);
98+
static util::ComparisonResult DocumentCompare(const Document& lhs,
99+
const Document& rhs);
100100

101101
/**
102102
* Returns the latest read time version that has been indexed by Firestore for

Firestore/core/src/util/ordered_code.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ static inline void AppendUpto9(std::string* dst,
391391
dst->erase(old_size + n);
392392
}
393393

394-
void OrderedCode::WriteNumIncreasing(std::string* dest, uint64_t val) {
394+
void OrderedCode::WriteNumIncreasing(std::string* dest, uint64_t num) {
395395
// Values are encoded with a single byte length prefix, followed
396396
// by the actual value in big-endian format with leading 0 bytes
397397
// dropped.
@@ -402,14 +402,14 @@ void OrderedCode::WriteNumIncreasing(std::string* dest, uint64_t val) {
402402
char buf[17];
403403

404404
UNALIGNED_STORE64(buf + 1,
405-
absl::ghtonll(val)); // buf[0] may be needed for length
406-
const unsigned int length = OrderedNumLength(val);
405+
absl::ghtonll(num)); // buf[0] may be needed for length
406+
const unsigned int length = OrderedNumLength(num);
407407
char* start = buf + 9 - length - 1;
408408
*start = static_cast<char>(length);
409409
AppendUpto9(dest, start, length + 1);
410410
}
411411

412-
void OrderedCode::WriteNumDecreasing(std::string* dest, uint64_t val) {
412+
void OrderedCode::WriteNumDecreasing(std::string* dest, uint64_t num) {
413413
// Values are encoded with a single byte length prefix, followed
414414
// by the actual value in big-endian format with leading 0 bytes
415415
// dropped.
@@ -420,8 +420,8 @@ void OrderedCode::WriteNumDecreasing(std::string* dest, uint64_t val) {
420420
char buf[17];
421421

422422
UNALIGNED_STORE64(buf + 1,
423-
absl::ghtonll(~val)); // buf[0] may be needed for length
424-
const unsigned int length = OrderedNumLength(val);
423+
absl::ghtonll(~num)); // buf[0] may be needed for length
424+
const unsigned int length = OrderedNumLength(num);
425425
char* start = buf + 9 - length - 1;
426426
*start = static_cast<char>(~length);
427427
AppendUpto9(dest, start, length + 1);
@@ -750,19 +750,19 @@ static inline int SignedEncodingLengthPositive(int64_t n) {
750750
return kBitsToLength[Bits::Log2FloorNonZero64(n) + 1];
751751
}
752752

753-
void OrderedCode::WriteSignedNumIncreasing(std::string* dest, int64_t val) {
754-
const uint64_t x = val < 0 ? ~val : val;
753+
void OrderedCode::WriteSignedNumIncreasing(std::string* dest, int64_t num) {
754+
const uint64_t x = num < 0 ? ~num : num;
755755
if (x < 64) { // fast path for encoding length == 1
756-
*dest += kLengthToHeaderBits[1][0] ^ val;
756+
*dest += kLengthToHeaderBits[1][0] ^ num;
757757
return;
758758
}
759-
// buf = val in network byte order, sign extended to 10 bytes
760-
const char sign_byte = val < 0 ? '\xff' : '\0';
759+
// buf = num in network byte order, sign extended to 10 bytes
760+
const char sign_byte = num < 0 ? '\xff' : '\0';
761761
char buf[10] = {
762762
sign_byte,
763763
sign_byte,
764764
};
765-
UNALIGNED_STORE64(buf + 2, absl::ghtonll(val));
765+
UNALIGNED_STORE64(buf + 2, absl::ghtonll(num));
766766
static_assert(sizeof(buf) == kMaxSigned64Length, "max_length_size_mismatch");
767767
const int len = SignedEncodingLengthPositive(x);
768768
HARD_ASSERT(len >= 2);

0 commit comments

Comments
 (0)