Skip to content

Commit

Permalink
Fixed a bug in reading json files
Browse files Browse the repository at this point in the history
  • Loading branch information
hosseinmoein committed Sep 28, 2023
1 parent 277e641 commit 2b4d6c6
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 24 deletions.
3 changes: 0 additions & 3 deletions include/DataFrame/Internals/DataFrame_read.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ void DataFrame<I, H>::read_json_(std::istream &stream, bool columns_only) {
std::string col_type;
std::string token;

col_name.reserve(256);
col_type.reserve(256);
token.reserve(128);
while (stream.get(c)) [[likely]] {
col_name.clear();
col_type.clear();
Expand Down
1 change: 1 addition & 0 deletions include/DataFrame/Internals/DataFrame_standalone.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ _get_token_from_file_ (std::istream &file,

char c;

value.clear();
while (file.get(c)) [[likely]]
if (c == delim) {
break;
Expand Down
Loading

0 comments on commit 2b4d6c6

Please sign in to comment.