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

Fix use of deprecated std::char_traits<unsigned short>::length #753

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 5, 2024

  1. Fix use of deprecated std::char_traits<unsigned short>::length

    Some versions of clang - particularly the one on MacOS - emitted the
    following warning when compiling javacpp:
    
    > `jniNativeLibrary.cpp:314:57: warning: 'char_traits' is deprecated:
    > char_traits for T not equal to char, wchar_t, char8_t, char16_t or
    > char32_t is non-standard and is provided for a temporary period. It
    > will be removed in LLVM 18, so please migrate off of it.
    > [-Wdeprecated-declarations] return JavaCPP_createStringFromUTF16(env,
    > ptr, std::char_traits::length(ptr));
    
    This commit fixes that warning by adding a function JavaCPP_stringLength
    for strings of unsigned short.
    codeinred committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    f3fd62a View commit details
    Browse the repository at this point in the history