Skip to content

Commit e26025c

Browse files
authored
Address STLPort-specific workarounds (#493)
* Use std::to_string (STLport is no longer supported). * Remove more STLPort workarounds. * Still can't use std::to_string
1 parent 12968c3 commit e26025c

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

firestore/src/common/field_value.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ using Type = FieldValue::Type;
2727

2828
template <typename T>
2929
std::string ValueToString(const T& value) {
30-
// TODO(stlport): use `std::to_string` once possible.
30+
// TODO(b/192885139): use `std::to_string` once possible.
3131
std::ostringstream stream;
3232
stream << value;
3333
return stream.str();

firestore/src/common/firestore.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ Firestore* Firestore::AddFirestoreToCache(Firestore* firestore,
132132
return nullptr;
133133
}
134134

135-
// Once we remove STLPort support, change this back to `emplace`.
136-
FirestoreCache()->insert(std::make_pair(firestore->app(), firestore));
135+
FirestoreCache()->emplace(firestore->app(), firestore);
137136
return firestore;
138137
}
139138

firestore/src/jni/env.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ std::string Env::ToStringUtf(const String& string) {
174174
size_t len = GetArrayLength(bytes);
175175

176176
// Copy directly into the std::string buffer. This is guaranteed to work as
177-
// of C++11, and also happens to work with STLPort.
177+
// of C++11.
178178
std::string result;
179179
result.resize(len);
180180

firestore/src/jni/env.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace firebase {
2323
namespace firestore {
2424
namespace jni {
2525

26-
// Since we're targeting STLPort, `std::invoke` is not available.
26+
// TODO: Consider using `std::invoke` when we move to C++17.
2727
#define INVOKE(env, method, ...) ((env)->*(method))(__VA_ARGS__);
2828

2929
/**

0 commit comments

Comments
 (0)