Skip to content

Commit c4e5684

Browse files
authored
Remove all the remaining traces of 163140650. (#513)
1 parent e26025c commit c4e5684

File tree

5 files changed

+6
-22
lines changed

5 files changed

+6
-22
lines changed

firestore/src/android/field_value_android.cc

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -256,16 +256,7 @@ const uint8_t* FieldValueInternal::blob_value() const {
256256
return nullptr;
257257
}
258258

259-
if (cached_blob_->empty()) {
260-
// The return value doesn't matter, but we can't return
261-
// `&cached_blob->front()` because calling `front` on an empty vector is
262-
// undefined behavior. When we drop support for STLPort, we can use `data`
263-
// instead which is defined, even for empty vectors.
264-
// TODO(b/163140650): remove this special case.
265-
return nullptr;
266-
}
267-
268-
return &(cached_blob_->front());
259+
return cached_blob_->data();
269260
}
270261

271262
size_t FieldValueInternal::blob_size() const {

firestore/src/android/util_android.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ std::vector<PublicT> MakePublicVector(jni::Env& env,
3333
jni::Local<jni::Object> element = from.Get(env, i);
3434

3535
// Avoid creating a partially valid public object on failure.
36-
//
37-
// TODO(b/163140650): Use `return {}`
38-
// Clang 5 with STLPort gives a "chosen constructor is explicit in
39-
// copy-initialization" error because the default constructor is explicit.
40-
if (!env.ok()) return std::vector<PublicT>();
36+
if (!env.ok()) return {};
4137

4238
// Use push_back because emplace_back requires a public constructor.
4339
result.push_back(MakePublic<PublicT>(env, firestore, element));

firestore/src/common/exception_common.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
// For internal programming errors, including internal argument checking, use
1919
// HARD_ASSERT or HARD_FAIL().
2020
//
21-
// TODO(b/163140650): Remove this/unify with the iOS implementation.
22-
// On Android we still support customers building with STLPort, which precludes
23-
// use of Abseil here.
21+
// TODO(b/191981857): Remove this/unify with the iOS implementation.
2422

2523
#include <string>
2624

firestore/src/common/macros.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// A collection of macros that really should come from elsewhere but are
99
// required for compatibility with STLPort.
1010
//
11-
// TODO(b/163140650): Remove these and just use the Abseil equivalents.
11+
// TODO(b/191981857): Remove these and just use the Abseil equivalents.
1212

1313
#if !defined(__ANDROID__)
1414
#include "absl/base/attributes.h"
@@ -25,7 +25,7 @@
2525
//
2626
// Discover if exceptions are enabled and define them as needed.
2727
//
28-
// TODO(b/163140650): Consider ABSL_HAVE_EXCEPTIONS after dropping STLPort.
28+
// TODO(b/191981857): Consider using ABSL_HAVE_EXCEPTIONS.
2929
// This will require re-validating the results of `GetFullCompilerInfo()` on all
3030
// supported platforms.
3131
#if defined(__clang__)

firestore/src/common/settings.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ const char kDefaultHost[] = "firestore.googleapis.com";
2121
std::string ToStr(bool v) { return v ? "true" : "false"; }
2222

2323
std::string ToStr(int64_t v) {
24-
// TODO(b/163140650): use `std::to_string` (which will make this function
25-
// unnecessary).
24+
// TODO(b/192885139): when possible, use `std::to_string` instead.
2625
std::ostringstream s;
2726
s << v;
2827
return s.str();

0 commit comments

Comments
 (0)