Skip to content

Commit

Permalink
Fixed mistake in README.md (vincentlaucsb#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentlaucsb authored May 20, 2019
1 parent c82776f commit 0595acb
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,10 @@ format.delimiter('\t')
// Alternatively, we can use format.delimiter({ '\t', ',', ... })
// to tell the CSV guesser which delimiters to try out

CSVReader reader("wierd_csv_dialect.csv", {}, format);
// Alternatively, we can use format.delimiter({ '\t', ',', ... })
// to tell the CSV guesser which delimiters to try out

CSVReader reader("wierd_csv_dialect.csv", format);

for (auto& row: reader) {
// Do stuff with rows here
Expand Down
2 changes: 1 addition & 1 deletion docs/source/Doxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ format.delimiter('\t')
// Alternatively, we can use format.delimiter({ '\t', ',', ... })
// to tell the CSV guesser which delimiters to try out

CSVReader reader("wierd_csv_dialect.csv", {}, format);
CSVReader reader("wierd_csv_dialect.csv", format);

for (auto& row: reader) {
// Do stuff with rows here
Expand Down
2 changes: 1 addition & 1 deletion include/csv.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
CSV for C++, version 1.1.3
CSV for C++, version 1.1.4
https://github.com/vincentlaucsb/csv-parser
MIT License
Expand Down
1 change: 0 additions & 1 deletion include/internal/csv_format.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ namespace csv {
/** Tells the parser to detect and remove UTF-8 byte order marks */
CSVFormat& detect_bom(bool detect = true);


#ifndef DOXYGEN_SHOULD_SKIP_THIS
char get_delim() {
// This error should never be received by end users.
Expand Down
4 changes: 2 additions & 2 deletions include/internal/csv_reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ namespace csv {
void second_guess();

private:
std::string filename; /**< File to read */
std::string head; /**< First x bytes of file */
std::string filename; /**< File to read */
std::string head; /**< First x bytes of file */
std::vector<char> delims; /**< Candidate delimiters */

char delim; /**< Chosen delimiter (set by guess_delim()) */
Expand Down
2 changes: 1 addition & 1 deletion include/internal/csv_row.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ namespace csv {
};

/** Constructor for testing */
CSVRow(const std::string& str, const std::vector<unsigned short> splits,
CSVRow(const std::string& str, const std::vector<unsigned short>& splits,
const std::shared_ptr<internals::ColNames>& col_names)
: CSVRow(internals::BufferPtr(new internals::RawRowBuffer(str, splits, col_names))) {};

Expand Down
9 changes: 4 additions & 5 deletions single_include/csv.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
/*
CSV for C++, version 1.1.3
CSV for C++, version 1.1.4
https://github.com/vincentlaucsb/csv-parser
MIT License
Expand Down Expand Up @@ -1430,7 +1430,6 @@ namespace csv {
/** Tells the parser to detect and remove UTF-8 byte order marks */
CSVFormat& detect_bom(bool detect = true);


#ifndef DOXYGEN_SHOULD_SKIP_THIS
char get_delim() {
// This error should never be received by end users.
Expand Down Expand Up @@ -2057,7 +2056,7 @@ namespace csv {
};

/** Constructor for testing */
CSVRow(const std::string& str, const std::vector<unsigned short> splits,
CSVRow(const std::string& str, const std::vector<unsigned short>& splits,
const std::shared_ptr<internals::ColNames>& col_names)
: CSVRow(internals::BufferPtr(new internals::RawRowBuffer(str, splits, col_names))) {};

Expand Down Expand Up @@ -2460,8 +2459,8 @@ namespace csv {
void second_guess();

private:
std::string filename; /**< File to read */
std::string head; /**< First x bytes of file */
std::string filename; /**< File to read */
std::string head; /**< First x bytes of file */
std::vector<char> delims; /**< Candidate delimiters */

char delim; /**< Chosen delimiter (set by guess_delim()) */
Expand Down

0 comments on commit 0595acb

Please sign in to comment.