diff options
author | Sven Gothel <[email protected]> | 2022-09-16 06:36:48 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-09-16 06:36:48 +0200 |
commit | e7c130eef8064564468bd5cf1c3f061f61c24853 (patch) | |
tree | ba8a669795a079ab3be79affef0ed26605aad136 /java_jni/jni | |
parent | 990271adbff41c032a2e05fabe11787d9b5ed927 (diff) |
jau::FunctionDef<> -> jau::function<R(A...)> using proper function prototype template definition and default c++ naming scheme (function_def.hpp -> functional.hpp)
Changes
- Instead of FunctionDef<R, A1, A2> -> function<R(A1, A2)>
- Added support for void return type
- C++ naming scheme
- Enhance unit tests a little.
Examples:
- jau::function<bool(int)> func = jau::bind_member(&i1, &MyClass::m_func1);
- jau::function<void(int)> func = jau::bind_member(&il, &MyClass::m_func2);
- ...
Diffstat (limited to 'java_jni/jni')
-rw-r--r-- | java_jni/jni/jau/jau_fs_FileUtil.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java_jni/jni/jau/jau_fs_FileUtil.cxx b/java_jni/jni/jau/jau_fs_FileUtil.cxx index 641d3b3..f94fbb2 100644 --- a/java_jni/jni/jau/jau_fs_FileUtil.cxx +++ b/java_jni/jni/jau/jau_fs_FileUtil.cxx @@ -362,7 +362,7 @@ jobject Java_org_jau_fs_FileUtil_get_1dir_1content(JNIEnv *env, jclass cls, jstr try { const std::string path = jau::jni::from_jstring_to_string(env, jpath); std::vector<jau::fs::dir_item> content; - const jau::fs::consume_dir_item cs = jau::bindCaptureRefFunc<void, std::vector<jau::fs::dir_item>, const jau::fs::dir_item&>(&content, + const jau::fs::consume_dir_item cs = jau::bind_capref<void, std::vector<jau::fs::dir_item>, const jau::fs::dir_item&>(&content, ( void(*)(std::vector<jau::fs::dir_item>*, const jau::fs::dir_item&) ) /* help template type deduction of function-ptr */ ( [](std::vector<jau::fs::dir_item>* receiver, const jau::fs::dir_item& item) -> void { receiver->push_back( item ); } ) ); |