Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
84e57412
Commit
84e57412
authored
Apr 14, 2015
by
Milo Yip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix gcc warning
parent
872aba66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
23 deletions
+5
-23
encodedstream.h
include/rapidjson/encodedstream.h
+5
-23
No files found.
include/rapidjson/encodedstream.h
View file @
84e57412
...
...
@@ -178,19 +178,10 @@ private:
}
// Runtime check whether the size of character type is sufficient. It only perform checks with assertion.
switch
(
type_
)
{
case
kUTF8
:
// Do nothing
break
;
case
kUTF16LE
:
case
kUTF16BE
:
if
(
type_
==
kUTF16LE
||
type_
==
kUTF16BE
)
RAPIDJSON_ASSERT
(
sizeof
(
Ch
)
>=
2
);
break
;
case
kUTF32LE
:
case
kUTF32BE
:
else
if
(
type_
==
kUTF32LE
||
type_
==
kUTF32BE
)
RAPIDJSON_ASSERT
(
sizeof
(
Ch
)
>=
4
);
break
;
}
}
typedef
Ch
(
*
TakeFunc
)(
InputByteStream
&
is
);
...
...
@@ -221,20 +212,11 @@ public:
AutoUTFOutputStream
(
OutputByteStream
&
os
,
UTFType
type
,
bool
putBOM
)
:
os_
(
&
os
),
type_
(
type
)
{
RAPIDJSON_ASSERT
(
type
>=
kUTF8
&&
type
<=
kUTF32BE
);
// RUntime check whether the size of character type is sufficient. It only perform checks with assertion.
switch
(
type_
)
{
case
kUTF16LE
:
case
kUTF16BE
:
// Runtime check whether the size of character type is sufficient. It only perform checks with assertion.
if
(
type_
==
kUTF16LE
||
type_
==
kUTF16BE
)
RAPIDJSON_ASSERT
(
sizeof
(
Ch
)
>=
2
);
break
;
case
kUTF32LE
:
case
kUTF32BE
:
else
if
(
type_
==
kUTF32LE
||
type_
==
kUTF32BE
)
RAPIDJSON_ASSERT
(
sizeof
(
Ch
)
>=
4
);
break
;
case
kUTF8
:
// Do nothing
break
;
}
static
const
PutFunc
f
[]
=
{
RAPIDJSON_ENCODINGS_FUNC
(
Put
)
};
putFunc_
=
f
[
type_
];
...
...
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