@@ -31,7 +31,7 @@ namespace Json {
3131class JSON_API Reader {
3232public:
3333 typedef char Char;
34- typedef const Char * Location;
34+ typedef const Char* Location;
3535
3636 /* * \brief An error tagged with where in the JSON text it was encountered.
3737 *
@@ -53,7 +53,7 @@ class JSON_API Reader {
5353 /* * \brief Constructs a Reader allowing the specified feature set
5454 * for parsing.
5555 */
56- Reader (const Features & features);
56+ Reader (const Features& features);
5757
5858 /* * \brief Read a Value from a <a HREF="http://www.json.org">JSON</a>
5959 * document.
@@ -70,7 +70,7 @@ class JSON_API Reader {
7070 * error occurred.
7171 */
7272 bool
73- parse (const std::string & document, Value & root, bool collectComments = true );
73+ parse (const std::string& document, Value& root, bool collectComments = true );
7474
7575 /* * \brief Read a Value from a <a HREF="http://www.json.org">JSON</a>
7676 document.
@@ -90,14 +90,14 @@ class JSON_API Reader {
9090 * \return \c true if the document was successfully parsed, \c false if an
9191 error occurred.
9292 */
93- bool parse (const char * beginDoc,
94- const char * endDoc,
95- Value & root,
93+ bool parse (const char * beginDoc,
94+ const char * endDoc,
95+ Value& root,
9696 bool collectComments = true );
9797
9898 // / \brief Parse from input stream.
9999 // / \see Json::operator>>(std::istream&, Json::Value&).
100- bool parse (std::istream & is, Value & root, bool collectComments = true );
100+ bool parse (std::istream& is, Value& root, bool collectComments = true );
101101
102102 /* * \brief Returns a user friendly string that list errors in the parsed
103103 * document.
@@ -164,8 +164,8 @@ class JSON_API Reader {
164164
165165 typedef std::deque<ErrorInfo> Errors;
166166
167- bool expectToken (TokenType type, Token & token, const char * message);
168- bool readToken (Token & token);
167+ bool expectToken (TokenType type, Token& token, const char * message);
168+ bool readToken (Token& token);
169169 void skipSpaces ();
170170 bool match (Location pattern, int patternLength);
171171 bool readComment ();
@@ -174,45 +174,45 @@ class JSON_API Reader {
174174 bool readString ();
175175 void readNumber ();
176176 bool readValue ();
177- bool readObject (Token & token);
178- bool readArray (Token & token);
179- bool decodeNumber (Token & token);
180- bool decodeNumber (Token & token, Value & decoded);
181- bool decodeString (Token & token);
182- bool decodeString (Token & token, std::string & decoded);
183- bool decodeDouble (Token & token);
184- bool decodeDouble (Token & token, Value & decoded);
185- bool decodeUnicodeCodePoint (Token & token,
186- Location & current,
177+ bool readObject (Token& token);
178+ bool readArray (Token& token);
179+ bool decodeNumber (Token& token);
180+ bool decodeNumber (Token& token, Value& decoded);
181+ bool decodeString (Token& token);
182+ bool decodeString (Token& token, std::string& decoded);
183+ bool decodeDouble (Token& token);
184+ bool decodeDouble (Token& token, Value& decoded);
185+ bool decodeUnicodeCodePoint (Token& token,
186+ Location& current,
187187 Location end,
188- unsigned int & unicode);
189- bool decodeUnicodeEscapeSequence (Token & token,
190- Location & current,
188+ unsigned int & unicode);
189+ bool decodeUnicodeEscapeSequence (Token& token,
190+ Location& current,
191191 Location end,
192- unsigned int & unicode);
193- bool addError (const std::string & message, Token & token, Location extra = 0 );
192+ unsigned int & unicode);
193+ bool addError (const std::string& message, Token& token, Location extra = 0 );
194194 bool recoverFromError (TokenType skipUntilToken);
195- bool addErrorAndRecover (const std::string & message,
196- Token & token,
195+ bool addErrorAndRecover (const std::string& message,
196+ Token& token,
197197 TokenType skipUntilToken);
198198 void skipUntilSpace ();
199- Value & currentValue ();
199+ Value& currentValue ();
200200 Char getNextChar ();
201201 void
202- getLocationLineAndColumn (Location location, int & line, int & column) const ;
202+ getLocationLineAndColumn (Location location, int & line, int & column) const ;
203203 std::string getLocationLineAndColumn (Location location) const ;
204204 void addComment (Location begin, Location end, CommentPlacement placement);
205- void skipCommentTokens (Token & token);
205+ void skipCommentTokens (Token& token);
206206
207- typedef std::stack<Value *> Nodes;
207+ typedef std::stack<Value*> Nodes;
208208 Nodes nodes_;
209209 Errors errors_;
210210 std::string document_;
211211 Location begin_;
212212 Location end_;
213213 Location current_;
214214 Location lastValueEnd_;
215- Value * lastValue_;
215+ Value* lastValue_;
216216 std::string commentsBefore_;
217217 Features features_;
218218 bool collectComments_;
@@ -242,7 +242,7 @@ class JSON_API Reader {
242242 \throw std::exception on parse error.
243243 \see Json::operator<<()
244244*/
245- JSON_API std::istream & operator >>(std::istream &, Value &);
245+ JSON_API std::istream& operator >>(std::istream&, Value&);
246246
247247} // namespace Json
248248
0 commit comments