Skip to content

Commit 2d4bb22

Browse files
committed
fix: fromCpp() should return the interface instead
1 parent c56b9c5 commit 2d4bb22

10 files changed

+10
-10
lines changed

packages/nitrogen/src/syntax/kotlin/KotlinFunction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ namespace ${cxxNamespace} {
196196
*/
197197
struct J${name}_cxx final: public jni::HybridClass<J${name}_cxx, J${name}> {
198198
public:
199-
static jni::local_ref<J${name}_cxx::javaobject> fromCpp(const ${typename}& func) {
199+
static jni::local_ref<J${name}::javaobject> fromCpp(const ${typename}& func) {
200200
return J${name}_cxx::newObjectCxxArgs(func);
201201
}
202202

packages/react-native-nitro-image/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_double__.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ namespace margelo::nitro::image {
5050
*/
5151
struct JFunc_std__shared_ptr_Promise_double___cxx final: public jni::HybridClass<JFunc_std__shared_ptr_Promise_double___cxx, JFunc_std__shared_ptr_Promise_double__> {
5252
public:
53-
static jni::local_ref<JFunc_std__shared_ptr_Promise_double___cxx::javaobject> fromCpp(const std::function<std::shared_ptr<Promise<double>>()>& func) {
53+
static jni::local_ref<JFunc_std__shared_ptr_Promise_double__::javaobject> fromCpp(const std::function<std::shared_ptr<Promise<double>>()>& func) {
5454
return JFunc_std__shared_ptr_Promise_double___cxx::newObjectCxxArgs(func);
5555
}
5656

packages/react-native-nitro-image/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_double____.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ namespace margelo::nitro::image {
6161
*/
6262
struct JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_double_____cxx final: public jni::HybridClass<JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_double_____cxx, JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_double____> {
6363
public:
64-
static jni::local_ref<JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_double_____cxx::javaobject> fromCpp(const std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<double>>>>()>& func) {
64+
static jni::local_ref<JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_double____::javaobject> fromCpp(const std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<double>>>>()>& func) {
6565
return JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_double_____cxx::newObjectCxxArgs(func);
6666
}
6767

packages/react-native-nitro-image/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer_____.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ namespace margelo::nitro::image {
6464
*/
6565
struct JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer______cxx final: public jni::HybridClass<JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer______cxx, JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer_____> {
6666
public:
67-
static jni::local_ref<JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer______cxx::javaobject> fromCpp(const std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>>>()>& func) {
67+
static jni::local_ref<JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer_____::javaobject> fromCpp(const std::function<std::shared_ptr<Promise<std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>>>()>& func) {
6868
return JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer______cxx::newObjectCxxArgs(func);
6969
}
7070

packages/react-native-nitro-image/nitrogen/generated/android/c++/JFunc_std__shared_ptr_Promise_std__string__.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ namespace margelo::nitro::image {
5151
*/
5252
struct JFunc_std__shared_ptr_Promise_std__string___cxx final: public jni::HybridClass<JFunc_std__shared_ptr_Promise_std__string___cxx, JFunc_std__shared_ptr_Promise_std__string__> {
5353
public:
54-
static jni::local_ref<JFunc_std__shared_ptr_Promise_std__string___cxx::javaobject> fromCpp(const std::function<std::shared_ptr<Promise<std::string>>()>& func) {
54+
static jni::local_ref<JFunc_std__shared_ptr_Promise_std__string__::javaobject> fromCpp(const std::function<std::shared_ptr<Promise<std::string>>()>& func) {
5555
return JFunc_std__shared_ptr_Promise_std__string___cxx::newObjectCxxArgs(func);
5656
}
5757

packages/react-native-nitro-image/nitrogen/generated/android/c++/JFunc_void.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace margelo::nitro::image {
3636
*/
3737
struct JFunc_void_cxx final: public jni::HybridClass<JFunc_void_cxx, JFunc_void> {
3838
public:
39-
static jni::local_ref<JFunc_void_cxx::javaobject> fromCpp(const std::function<void()>& func) {
39+
static jni::local_ref<JFunc_void::javaobject> fromCpp(const std::function<void()>& func) {
4040
return JFunc_void_cxx::newObjectCxxArgs(func);
4141
}
4242

packages/react-native-nitro-image/nitrogen/generated/android/c++/JFunc_void_double.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace margelo::nitro::image {
3636
*/
3737
struct JFunc_void_double_cxx final: public jni::HybridClass<JFunc_void_double_cxx, JFunc_void_double> {
3838
public:
39-
static jni::local_ref<JFunc_void_double_cxx::javaobject> fromCpp(const std::function<void(double /* num */)>& func) {
39+
static jni::local_ref<JFunc_void_double::javaobject> fromCpp(const std::function<void(double /* num */)>& func) {
4040
return JFunc_void_double_cxx::newObjectCxxArgs(func);
4141
}
4242

packages/react-native-nitro-image/nitrogen/generated/android/c++/JFunc_void_std__optional_double_.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace margelo::nitro::image {
3737
*/
3838
struct JFunc_void_std__optional_double__cxx final: public jni::HybridClass<JFunc_void_std__optional_double__cxx, JFunc_void_std__optional_double_> {
3939
public:
40-
static jni::local_ref<JFunc_void_std__optional_double__cxx::javaobject> fromCpp(const std::function<void(std::optional<double> /* maybe */)>& func) {
40+
static jni::local_ref<JFunc_void_std__optional_double_::javaobject> fromCpp(const std::function<void(std::optional<double> /* maybe */)>& func) {
4141
return JFunc_void_std__optional_double__cxx::newObjectCxxArgs(func);
4242
}
4343

packages/react-native-nitro-image/nitrogen/generated/android/c++/JFunc_void_std__string.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace margelo::nitro::image {
3737
*/
3838
struct JFunc_void_std__string_cxx final: public jni::HybridClass<JFunc_void_std__string_cxx, JFunc_void_std__string> {
3939
public:
40-
static jni::local_ref<JFunc_void_std__string_cxx::javaobject> fromCpp(const std::function<void(const std::string& /* valueFromJs */)>& func) {
40+
static jni::local_ref<JFunc_void_std__string::javaobject> fromCpp(const std::function<void(const std::string& /* valueFromJs */)>& func) {
4141
return JFunc_void_std__string_cxx::newObjectCxxArgs(func);
4242
}
4343

packages/react-native-nitro-image/nitrogen/generated/android/c++/JFunc_void_std__vector_Powertrain_.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace margelo::nitro::image {
4747
*/
4848
struct JFunc_void_std__vector_Powertrain__cxx final: public jni::HybridClass<JFunc_void_std__vector_Powertrain__cxx, JFunc_void_std__vector_Powertrain_> {
4949
public:
50-
static jni::local_ref<JFunc_void_std__vector_Powertrain__cxx::javaobject> fromCpp(const std::function<void(const std::vector<Powertrain>& /* array */)>& func) {
50+
static jni::local_ref<JFunc_void_std__vector_Powertrain_::javaobject> fromCpp(const std::function<void(const std::vector<Powertrain>& /* array */)>& func) {
5151
return JFunc_void_std__vector_Powertrain__cxx::newObjectCxxArgs(func);
5252
}
5353

0 commit comments

Comments
 (0)