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
a6a73b51
Commit
a6a73b51
authored
Dec 18, 2015
by
Milo Yip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to fix clang and gcc warnings problems againx2
parent
9ce381b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
17 deletions
+23
-17
memorystream.h
include/rapidjson/memorystream.h
+9
-0
pointer.h
include/rapidjson/pointer.h
+14
-17
No files found.
include/rapidjson/memorystream.h
View file @
a6a73b51
...
...
@@ -17,6 +17,11 @@
#include "rapidjson.h"
#ifdef __clang__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
unreachable
-
code
)
#endif
RAPIDJSON_NAMESPACE_BEGIN
//! Represents an in-memory input byte stream.
...
...
@@ -58,4 +63,8 @@ struct MemoryStream {
RAPIDJSON_NAMESPACE_END
#ifdef __clang__
RAPIDJSON_DIAG_POP
#endif
#endif // RAPIDJSON_MEMORYBUFFER_H_
include/rapidjson/pointer.h
View file @
a6a73b51
...
...
@@ -18,6 +18,11 @@
#include "document.h"
#include "internal/itoa.h"
#ifdef __clang__
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF
(
switch
-
enum
)
#endif
RAPIDJSON_NAMESPACE_BEGIN
static
const
SizeType
kPointerInvalidIndex
=
~
SizeType
(
0
);
//!< Represents an invalid index in GenericPointer::Token
...
...
@@ -71,7 +76,7 @@ template <typename ValueType, typename Allocator = CrtAllocator>
class
GenericPointer
{
public
:
typedef
typename
ValueType
::
EncodingType
EncodingType
;
//!< Encoding type from Value
typedef
typename
EncodingType
::
Ch
Ch
;
//!< Character type from Value
typedef
typename
ValueType
::
Ch
Ch
;
//!< Character type from Value
//! A token is the basic units of internal representation.
/*!
...
...
@@ -472,11 +477,7 @@ public:
return
0
;
v
=
&
((
*
v
)[
t
->
index
]);
break
;
case
kNullType
:
case
kFalseType
:
case
kTrueType
:
case
kStringType
:
case
kNumberType
:
default
:
return
0
;
}
}
...
...
@@ -705,11 +706,7 @@ public:
return
false
;
v
=
&
((
*
v
)[
t
->
index
]);
break
;
case
kNullType
:
case
kFalseType
:
case
kTrueType
:
case
kStringType
:
case
kNumberType
:
default
:
return
false
;
}
}
...
...
@@ -722,11 +719,7 @@ public:
return
false
;
v
->
Erase
(
v
->
Begin
()
+
last
->
index
);
return
true
;
case
kNullType
:
case
kFalseType
:
case
kTrueType
:
case
kStringType
:
case
kNumberType
:
default
:
return
false
;
}
}
...
...
@@ -958,7 +951,7 @@ private:
*/
class
PercentDecodeStream
{
public
:
typedef
Ch
Ch
;
typedef
typename
ValueType
::
Ch
Ch
;
//! Constructor
/*!
...
...
@@ -1326,4 +1319,8 @@ bool EraseValueByPointer(T& root, const CharType(&source)[N]) {
RAPIDJSON_NAMESPACE_END
#ifdef __clang__
RAPIDJSON_DIAG_POP
#endif
#endif // RAPIDJSON_POINTER_H_
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