coverity findings: initialize index counter in line splitter.
parent
7c3475c002
commit
0f1874d954
|
@ -83,7 +83,8 @@ public:
|
||||||
note: trim is *always* assumed true if skyp_empty_lines==true
|
note: trim is *always* assumed true if skyp_empty_lines==true
|
||||||
*/
|
*/
|
||||||
LineSplitter(StreamReaderLE& stream, bool skip_empty_lines = true, bool trim = true)
|
LineSplitter(StreamReaderLE& stream, bool skip_empty_lines = true, bool trim = true)
|
||||||
: stream(stream)
|
: idx( 0 )
|
||||||
|
, stream(stream)
|
||||||
, swallow()
|
, swallow()
|
||||||
, skip_empty_lines(skip_empty_lines)
|
, skip_empty_lines(skip_empty_lines)
|
||||||
, trim(trim)
|
, trim(trim)
|
||||||
|
@ -94,6 +95,10 @@ public:
|
||||||
idx = 0;
|
idx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~LineSplitter() {
|
||||||
|
// empty
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
|
@ -227,7 +232,10 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
LineSplitter( const LineSplitter & );
|
||||||
|
LineSplitter &operator = ( const LineSplitter & );
|
||||||
|
|
||||||
|
private:
|
||||||
line_idx idx;
|
line_idx idx;
|
||||||
std::string cur;
|
std::string cur;
|
||||||
StreamReaderLE& stream;
|
StreamReaderLE& stream;
|
||||||
|
|
Loading…
Reference in New Issue