Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android] Swap std::ostringstream usage for std::to_string #8542

Merged
merged 5 commits into from May 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 1 addition & 10 deletions android/ReactCommon/jsi/JSCRuntime.cpp
Expand Up @@ -319,15 +319,6 @@ JSStringRef getIsArrayString() {
#endif
} // namespace

// std::string utility
namespace {
std::string to_string(void* value) {
std::ostringstream ss;
ss << value;
return ss.str();
}
} // namespace

JSCRuntime::JSCRuntime()
: JSCRuntime(JSGlobalContextCreateInGroup(nullptr, nullptr)) {
JSGlobalContextRelease(ctx_);
Expand Down Expand Up @@ -405,7 +396,7 @@ jsi::Object JSCRuntime::global() {

std::string JSCRuntime::description() {
if (desc_.empty()) {
desc_ = std::string("<JSCRuntime@") + to_string(this) + ">";
desc_ = std::string("<JSCRuntime@") + std::to_string(reinterpret_cast<std::uintptr_t>(this)) + ">";
}
return desc_;
}
Expand Down
@@ -1,4 +1,4 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Tue Feb 25 19:27:11 CET 2020
#Thu May 28 17:48:15 CEST 2020
reactandroid-abi35_0_0-1.0.0.pom>=
reactandroid-abi35_0_0-1.0.0.aar>=
Binary file not shown.
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>host.exp</groupId>
Expand Down
Expand Up @@ -7,6 +7,6 @@
<versions>
<version>1.0.0</version>
</versions>
<lastUpdated>20200225182711</lastUpdated>
<lastUpdated>20200528154815</lastUpdated>
</versioning>
</metadata>
@@ -1,4 +1,4 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Wed Feb 26 11:40:22 CET 2020
#Thu May 28 17:06:23 CEST 2020
reactandroid-abi36_0_0-1.0.0.pom>=
reactandroid-abi36_0_0-1.0.0.aar>=
Binary file not shown.
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>host.exp</groupId>
Expand Down
Expand Up @@ -7,6 +7,6 @@
<versions>
<version>1.0.0</version>
</versions>
<lastUpdated>20200226104022</lastUpdated>
<lastUpdated>20200528150623</lastUpdated>
</versioning>
</metadata>
@@ -1,4 +1,4 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Wed Mar 11 14:39:15 CET 2020
reactandroid-abi37_0_0-1.0.0.aar>=
#Thu May 28 15:04:45 CEST 2020
reactandroid-abi37_0_0-1.0.0.pom>=
reactandroid-abi37_0_0-1.0.0.aar>=
Binary file not shown.
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>host.exp</groupId>
Expand Down
Expand Up @@ -7,6 +7,6 @@
<versions>
<version>1.0.0</version>
</versions>
<lastUpdated>20200311133915</lastUpdated>
<lastUpdated>20200528130445</lastUpdated>
</versioning>
</metadata>
11 changes: 1 addition & 10 deletions android/versioned-react-native/ReactCommon/jsi/JSCRuntime.cpp
Expand Up @@ -319,15 +319,6 @@ JSStringRef getIsArrayString() {
#endif
} // namespace

// std::string utility
namespace {
std::string to_string(void* value) {
std::ostringstream ss;
ss << value;
return ss.str();
}
} // namespace

JSCRuntime::JSCRuntime()
: JSCRuntime(JSGlobalContextCreateInGroup(nullptr, nullptr)) {
JSGlobalContextRelease(ctx_);
Expand Down Expand Up @@ -405,7 +396,7 @@ jsi::Object JSCRuntime::global() {

std::string JSCRuntime::description() {
if (desc_.empty()) {
desc_ = std::string("<JSCRuntime@") + to_string(this) + ">";
desc_ = std::string("<JSCRuntime@") + std::to_string(reinterpret_cast<std::uintptr_t>(this)) + ">";
}
return desc_;
}
Expand Down
2 changes: 1 addition & 1 deletion react-native-lab/react-native