Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3522512
D9197.id31128.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9197.id31128.diff
View Options
diff --git a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
--- a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
+++ b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp
@@ -930,13 +930,13 @@
jsi::Value CommCoreModule::generateRandomString(jsi::Runtime &rt, double size) {
return createPromiseAsJSIValue(
- rt,
- [this, &size](jsi::Runtime &innerRt, std::shared_ptr<Promise> promise) {
- taskType job = [this, &innerRt, &size, promise]() {
+ rt, [=](jsi::Runtime &innerRt, std::shared_ptr<Promise> promise) {
+ taskType job = [=, &innerRt]() {
std::string error;
std::string randomString;
try {
- randomString = crypto::Tools::generateRandomString(size);
+ randomString =
+ crypto::Tools::generateRandomString(static_cast<size_t>(size));
} catch (const std::exception &e) {
error = "Failed to generate random string for size " +
std::to_string(size) + ": " + e.what();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 6:54 AM (20 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2698008
Default Alt Text
D9197.id31128.diff (1 KB)
Attached To
Mode
D9197: [CommCoreModule] capture primitive parameter by value
Attached
Detach File
Event Timeline
Log In to Comment