@@ -761,8 +761,8 @@ Reader::Char Reader::getNextChar() {
761
761
return *current_++;
762
762
}
763
763
764
- void Reader::getLocationLineAndColumn (Location location, int & line,
765
- int & column) const {
764
+ void Reader::getLocationLineAndColumn (Location location, size_t & line,
765
+ size_t & column) const {
766
766
Location current = begin_;
767
767
Location lastLineStart = current;
768
768
line = 0 ;
@@ -784,10 +784,11 @@ void Reader::getLocationLineAndColumn(Location location, int& line,
784
784
}
785
785
786
786
String Reader::getLocationLineAndColumn (Location location) const {
787
- int line, column;
787
+ size_t line, column;
788
788
getLocationLineAndColumn (location, line, column);
789
789
char buffer[18 + 16 + 16 + 1 ];
790
- jsoncpp_snprintf (buffer, sizeof (buffer), " Line %d, Column %d" , line, column);
790
+ jsoncpp_snprintf (buffer, sizeof (buffer), " Line %zu, Column %zu" , line,
791
+ column);
791
792
return buffer;
792
793
}
793
794
@@ -965,8 +966,8 @@ class OurReader {
965
966
void skipUntilSpace ();
966
967
Value& currentValue ();
967
968
Char getNextChar ();
968
- void getLocationLineAndColumn (Location location, int & line,
969
- int & column) const ;
969
+ void getLocationLineAndColumn (Location location, size_t & line,
970
+ size_t & column) const ;
970
971
String getLocationLineAndColumn (Location location) const ;
971
972
void addComment (Location begin, Location end, CommentPlacement placement);
972
973
void skipCommentTokens (Token& token);
@@ -1783,8 +1784,8 @@ OurReader::Char OurReader::getNextChar() {
1783
1784
return *current_++;
1784
1785
}
1785
1786
1786
- void OurReader::getLocationLineAndColumn (Location location, int & line,
1787
- int & column) const {
1787
+ void OurReader::getLocationLineAndColumn (Location location, size_t & line,
1788
+ size_t & column) const {
1788
1789
Location current = begin_;
1789
1790
Location lastLineStart = current;
1790
1791
line = 0 ;
@@ -1806,10 +1807,11 @@ void OurReader::getLocationLineAndColumn(Location location, int& line,
1806
1807
}
1807
1808
1808
1809
String OurReader::getLocationLineAndColumn (Location location) const {
1809
- int line, column;
1810
+ size_t line, column;
1810
1811
getLocationLineAndColumn (location, line, column);
1811
1812
char buffer[18 + 16 + 16 + 1 ];
1812
- jsoncpp_snprintf (buffer, sizeof (buffer), " Line %d, Column %d" , line, column);
1813
+ jsoncpp_snprintf (buffer, sizeof (buffer), " Line %zu, Column %zu" , line,
1814
+ column);
1813
1815
return buffer;
1814
1816
}
1815
1817
0 commit comments