From: Marcin Siodelski Date: Fri, 4 Apr 2014 12:38:03 +0000 (+0200) Subject: [master] Pass string instead of c-string in CSVFile class constructor. X-Git-Tag: bind10-1.2.0rc1-release~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dbd014d085fbaf14fd5e4c0496c2eb9b436d6288;p=thirdparty%2Fkea.git [master] Pass string instead of c-string in CSVFile class constructor. This fixes a performance issue reported by cppcheck. --- diff --git a/src/lib/util/csv_file.cc b/src/lib/util/csv_file.cc index 95a95c25df..3abf4ad667 100644 --- a/src/lib/util/csv_file.cc +++ b/src/lib/util/csv_file.cc @@ -29,7 +29,7 @@ CSVRow::CSVRow(const size_t cols, const char separator) CSVRow::CSVRow(const std::string& text, const char separator) : separator_(1, separator) { // Parsing is exception safe, so this will not throw. - parse(text.c_str()); + parse(text); } void