mirror of
https://github.com/boostorg/regex.git
synced 2025-07-17 14:22:08 +02:00
Initialize m_position, m_end, and m_flags
The constructor for basic_regex_formatter left m_position, m_end, and m_flags uninitialized, as uncovered by Coverity CID12310. We now value-initialize them in the initializer list.
This commit is contained in:
@ -96,7 +96,7 @@ class basic_regex_formatter
|
|||||||
public:
|
public:
|
||||||
typedef typename traits::char_type char_type;
|
typedef typename traits::char_type char_type;
|
||||||
basic_regex_formatter(OutputIterator o, const Results& r, const traits& t)
|
basic_regex_formatter(OutputIterator o, const Results& r, const traits& t)
|
||||||
: m_traits(t), m_results(r), m_out(o), m_state(output_copy), m_restore_state(output_copy), m_have_conditional(false) {}
|
: m_traits(t), m_results(r), m_out(o), m_position(), m_end(), m_flags(), m_state(output_copy), m_restore_state(output_copy), m_have_conditional(false) {}
|
||||||
OutputIterator format(ForwardIter p1, ForwardIter p2, match_flag_type f);
|
OutputIterator format(ForwardIter p1, ForwardIter p2, match_flag_type f);
|
||||||
OutputIterator format(ForwardIter p1, match_flag_type f)
|
OutputIterator format(ForwardIter p1, match_flag_type f)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user