Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
djinni
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
djinni
Commits
40b02bf6
Commit
40b02bf6
authored
Aug 02, 2016
by
Aleksey Konovalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check the representation of wchar_t only if they're used
parent
3a08ac1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
support-lib/jni/djinni_support.cpp
support-lib/jni/djinni_support.cpp
+4
-2
No files found.
support-lib/jni/djinni_support.cpp
View file @
40b02bf6
...
...
@@ -22,7 +22,6 @@
#include <cstring>
static_assert
(
sizeof
(
jlong
)
>=
sizeof
(
void
*
),
"must be able to fit a void* into a jlong"
);
static_assert
(
sizeof
(
wchar_t
)
==
2
||
sizeof
(
wchar_t
)
==
4
,
"wchar_t must be represented by UTF-16 or UTF-32 encoding"
);
namespace
djinni
{
...
...
@@ -373,7 +372,10 @@ jstring jniStringFromUTF8(JNIEnv * env, const std::string & str) {
}
template
<
int
wcharTypeSize
>
static
std
::
u16string
implWStringToUTF16
(
const
std
::
wstring
&
str
);
static
std
::
u16string
implWStringToUTF16
(
const
std
::
wstring
&
str
)
{
static_assert
(
wcharTypeSize
==
2
||
wcharTypeSize
==
4
,
"wchar_t must be represented by UTF-16 or UTF-32 encoding"
);
}
template
<
>
inline
std
::
u16string
implWStringToUTF16
<
2
>
(
const
std
::
wstring
&
str
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment