File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ class ParsedJson {
5151 // return false if the tape is likely wrong (e.g., you did not parse a valid
5252 // JSON).
5353 WARN_UNUSED
54- bool print_json (std::ostream &os);
54+ bool print_json (std::ostream &os) const ;
5555 WARN_UNUSED
56- bool dump_raw_tape (std::ostream &os);
56+ bool dump_raw_tape (std::ostream &os) const ;
5757
5858 // all nodes are stored on the tape using a 64-bit word.
5959 //
@@ -91,7 +91,7 @@ class ParsedJson {
9191 // tape[current_loc++] = *((uint64_t *)&d);
9292 }
9393
94- really_inline uint32_t get_current_loc () { return current_loc; }
94+ really_inline uint32_t get_current_loc () const { return current_loc; }
9595
9696 really_inline void annotate_previous_loc (uint32_t saved_loc, uint64_t val) {
9797 tape[saved_loc] |= val;
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ void ParsedJson::init() {
113113}
114114
115115WARN_UNUSED
116- bool ParsedJson::print_json (std::ostream &os) {
116+ bool ParsedJson::print_json (std::ostream &os) const {
117117 if (!valid) {
118118 return false ;
119119 }
@@ -241,7 +241,7 @@ bool ParsedJson::print_json(std::ostream &os) {
241241}
242242
243243WARN_UNUSED
244- bool ParsedJson::dump_raw_tape (std::ostream &os) {
244+ bool ParsedJson::dump_raw_tape (std::ostream &os) const {
245245 if (!valid) {
246246 return false ;
247247 }
You can’t perform that action at this time.
0 commit comments