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
3693e942
Commit
3693e942
authored
Jan 24, 2017
by
Milo Yip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix output character type in writers
parent
942bb460
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
prettywriter.h
include/rapidjson/prettywriter.h
+1
-1
writer.h
include/rapidjson/writer.h
+6
-6
No files found.
include/rapidjson/prettywriter.h
View file @
3693e942
...
...
@@ -249,7 +249,7 @@ protected:
void
WriteIndent
()
{
size_t
count
=
(
Base
::
level_stack_
.
GetSize
()
/
sizeof
(
typename
Base
::
Level
))
*
indentCharCount_
;
PutN
(
*
Base
::
os_
,
static_cast
<
typename
TargetEncoding
::
Ch
>
(
indentChar_
),
count
);
PutN
(
*
Base
::
os_
,
static_cast
<
typename
OutputStream
::
Ch
>
(
indentChar_
),
count
);
}
Ch
indentChar_
;
...
...
include/rapidjson/writer.h
View file @
3693e942
...
...
@@ -297,7 +297,7 @@ protected:
const
char
*
end
=
internal
::
i32toa
(
i
,
buffer
);
PutReserve
(
*
os_
,
static_cast
<
size_t
>
(
end
-
buffer
));
for
(
const
char
*
p
=
buffer
;
p
!=
end
;
++
p
)
PutUnsafe
(
*
os_
,
static_cast
<
typename
TargetEncoding
::
Ch
>
(
*
p
));
PutUnsafe
(
*
os_
,
static_cast
<
typename
OutputStream
::
Ch
>
(
*
p
));
return
true
;
}
...
...
@@ -306,7 +306,7 @@ protected:
const
char
*
end
=
internal
::
u32toa
(
u
,
buffer
);
PutReserve
(
*
os_
,
static_cast
<
size_t
>
(
end
-
buffer
));
for
(
const
char
*
p
=
buffer
;
p
!=
end
;
++
p
)
PutUnsafe
(
*
os_
,
static_cast
<
typename
TargetEncoding
::
Ch
>
(
*
p
));
PutUnsafe
(
*
os_
,
static_cast
<
typename
OutputStream
::
Ch
>
(
*
p
));
return
true
;
}
...
...
@@ -315,7 +315,7 @@ protected:
const
char
*
end
=
internal
::
i64toa
(
i64
,
buffer
);
PutReserve
(
*
os_
,
static_cast
<
size_t
>
(
end
-
buffer
));
for
(
const
char
*
p
=
buffer
;
p
!=
end
;
++
p
)
PutUnsafe
(
*
os_
,
static_cast
<
typename
TargetEncoding
::
Ch
>
(
*
p
));
PutUnsafe
(
*
os_
,
static_cast
<
typename
OutputStream
::
Ch
>
(
*
p
));
return
true
;
}
...
...
@@ -324,7 +324,7 @@ protected:
char
*
end
=
internal
::
u64toa
(
u64
,
buffer
);
PutReserve
(
*
os_
,
static_cast
<
size_t
>
(
end
-
buffer
));
for
(
char
*
p
=
buffer
;
p
!=
end
;
++
p
)
PutUnsafe
(
*
os_
,
static_cast
<
typename
TargetEncoding
::
Ch
>
(
*
p
));
PutUnsafe
(
*
os_
,
static_cast
<
typename
OutputStream
::
Ch
>
(
*
p
));
return
true
;
}
...
...
@@ -357,7 +357,7 @@ protected:
}
bool
WriteString
(
const
Ch
*
str
,
SizeType
length
)
{
static
const
typename
TargetEncoding
::
Ch
hexDigits
[
16
]
=
{
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
};
static
const
typename
OutputStream
::
Ch
hexDigits
[
16
]
=
{
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'F'
};
static
const
char
escape
[
256
]
=
{
#define Z16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
//0 1 2 3 4 5 6 7 8 9 A B C D E F
...
...
@@ -413,7 +413,7 @@ protected:
else
if
((
sizeof
(
Ch
)
==
1
||
static_cast
<
unsigned
>
(
c
)
<
256
)
&&
RAPIDJSON_UNLIKELY
(
escape
[
static_cast
<
unsigned
char
>
(
c
)]))
{
is
.
Take
();
PutUnsafe
(
*
os_
,
'\\'
);
PutUnsafe
(
*
os_
,
static_cast
<
typename
TargetEncoding
::
Ch
>
(
escape
[
static_cast
<
unsigned
char
>
(
c
)]));
PutUnsafe
(
*
os_
,
static_cast
<
typename
OutputStream
::
Ch
>
(
escape
[
static_cast
<
unsigned
char
>
(
c
)]));
if
(
escape
[
static_cast
<
unsigned
char
>
(
c
)]
==
'u'
)
{
PutUnsafe
(
*
os_
,
'0'
);
PutUnsafe
(
*
os_
,
'0'
);
...
...
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