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
2bbfe0d8
Commit
2bbfe0d8
authored
Feb 28, 2016
by
Sergey Kosarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Number() -> RawNumber() to avoid name clashes with the union Number
parent
4f94ec9b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
document.h
include/rapidjson/document.h
+1
-1
reader.h
include/rapidjson/reader.h
+3
-3
schema.h
include/rapidjson/schema.h
+1
-1
writer.h
include/rapidjson/writer.h
+1
-1
No files found.
include/rapidjson/document.h
View file @
2bbfe0d8
...
...
@@ -2325,7 +2325,7 @@ public:
bool
Uint64
(
uint64_t
i
)
{
new
(
stack_
.
template
Push
<
ValueType
>
())
ValueType
(
i
);
return
true
;
}
bool
Double
(
double
d
)
{
new
(
stack_
.
template
Push
<
ValueType
>
())
ValueType
(
d
);
return
true
;
}
bool
Number
(
const
Ch
*
str
,
SizeType
length
,
bool
copy
)
{
bool
Raw
Number
(
const
Ch
*
str
,
SizeType
length
,
bool
copy
)
{
if
(
copy
)
new
(
stack_
.
template
Push
<
ValueType
>
())
ValueType
(
str
,
length
,
GetAllocator
());
else
...
...
include/rapidjson/reader.h
View file @
2bbfe0d8
...
...
@@ -171,7 +171,7 @@ concept Handler {
bool Uint64(uint64_t i);
bool Double(double d);
/// enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length)
bool Number(const Ch* str, SizeType length, bool copy);
bool
Raw
Number(const Ch* str, SizeType length, bool copy);
bool String(const Ch* str, SizeType length, bool copy);
bool StartObject();
bool Key(const Ch* str, SizeType length, bool copy);
...
...
@@ -203,7 +203,7 @@ struct BaseReaderHandler {
bool
Uint64
(
uint64_t
)
{
return
static_cast
<
Override
&>
(
*
this
).
Default
();
}
bool
Double
(
double
)
{
return
static_cast
<
Override
&>
(
*
this
).
Default
();
}
/// enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length)
bool
Number
(
const
Ch
*
,
SizeType
,
bool
)
{
return
static_cast
<
Override
&>
(
*
this
).
Default
();
}
bool
Raw
Number
(
const
Ch
*
,
SizeType
,
bool
)
{
return
static_cast
<
Override
&>
(
*
this
).
Default
();
}
bool
String
(
const
Ch
*
,
SizeType
,
bool
)
{
return
static_cast
<
Override
&>
(
*
this
).
Default
();
}
bool
StartObject
()
{
return
static_cast
<
Override
&>
(
*
this
).
Default
();
}
bool
Key
(
const
Ch
*
str
,
SizeType
len
,
bool
copy
)
{
return
static_cast
<
Override
&>
(
*
this
).
String
(
str
,
len
,
copy
);
}
...
...
@@ -1276,7 +1276,7 @@ private:
s
.
Pop
();
// Pop stack no matter if it will be used or not.
const
size_t
length
=
s
.
Tell
()
-
startOffset
;
cont
=
handler
.
Number
(
head
,
length
,
(
parseFlags
&
kParseInsituFlag
)
?
false
:
true
);
cont
=
handler
.
Raw
Number
(
head
,
length
,
(
parseFlags
&
kParseInsituFlag
)
?
false
:
true
);
}
else
{
...
...
include/rapidjson/schema.h
View file @
2bbfe0d8
...
...
@@ -183,7 +183,7 @@ public:
return
WriteNumber
(
n
);
}
bool
Number
(
const
Ch
*
str
,
SizeType
len
,
bool
)
{
bool
Raw
Number
(
const
Ch
*
str
,
SizeType
len
,
bool
)
{
WriteBuffer
(
kNumberType
,
str
,
len
*
sizeof
(
Ch
));
return
true
;
}
...
...
include/rapidjson/writer.h
View file @
2bbfe0d8
...
...
@@ -171,7 +171,7 @@ public:
*/
bool
Double
(
double
d
)
{
Prefix
(
kNumberType
);
return
WriteDouble
(
d
);
}
bool
Number
(
const
Ch
*
str
,
SizeType
length
,
bool
copy
=
false
)
{
bool
Raw
Number
(
const
Ch
*
str
,
SizeType
length
,
bool
copy
=
false
)
{
(
void
)
copy
;
Prefix
(
kNumberType
);
return
WriteString
(
str
,
length
);
...
...
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