Skip to content

Commit d0a78bf

Browse files
committed
Added const for Reader methods
1 parent 342a616 commit d0a78bf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/rapidjson/reader.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ class GenericReader {
673673
//! Check if token-by-token parsing JSON text is complete
674674
/*! \return Whether the JSON has been fully decoded.
675675
*/
676-
RAPIDJSON_FORCEINLINE bool IterativeParseComplete() {
676+
RAPIDJSON_FORCEINLINE bool IterativeParseComplete() const {
677677
return IsIterativeParsingCompleteState(state_);
678678
}
679679

@@ -1785,7 +1785,7 @@ class GenericReader {
17851785
kTokenCount
17861786
};
17871787

1788-
RAPIDJSON_FORCEINLINE Token Tokenize(Ch c) {
1788+
RAPIDJSON_FORCEINLINE Token Tokenize(Ch c) const {
17891789

17901790
//!@cond RAPIDJSON_HIDDEN_FROM_DOXYGEN
17911791
#define N NumberToken
@@ -1812,7 +1812,7 @@ class GenericReader {
18121812
return NumberToken;
18131813
}
18141814

1815-
RAPIDJSON_FORCEINLINE IterativeParsingState Predict(IterativeParsingState state, Token token) {
1815+
RAPIDJSON_FORCEINLINE IterativeParsingState Predict(IterativeParsingState state, Token token) const {
18161816
// current state x one lookahead token -> new state
18171817
static const char G[cIterativeParsingStateCount][kTokenCount] = {
18181818
// Finish(sink state)
@@ -2151,11 +2151,11 @@ class GenericReader {
21512151
}
21522152
}
21532153

2154-
RAPIDJSON_FORCEINLINE bool IsIterativeParsingDelimiterState(IterativeParsingState s) {
2154+
RAPIDJSON_FORCEINLINE bool IsIterativeParsingDelimiterState(IterativeParsingState s) const {
21552155
return s >= IterativeParsingElementDelimiterState;
21562156
}
21572157

2158-
RAPIDJSON_FORCEINLINE bool IsIterativeParsingCompleteState(IterativeParsingState s) {
2158+
RAPIDJSON_FORCEINLINE bool IsIterativeParsingCompleteState(IterativeParsingState s) const {
21592159
return s <= IterativeParsingErrorState;
21602160
}
21612161

0 commit comments

Comments
 (0)