Skip to content

Conversation

@NeroBurner
Copy link
Contributor

In 9f10c00 main: report: remove custom DList, updates
the Report::Text function was switched to accept std::string& instead
of const char*. In the conversion the possibility of the char ptr to
be a nullptr was forgotten. A nullptr for text is interpreted as
draw_a_line. As std::string has no distinction between nullptr and
an empty string introduce the variable bool draw_a_line and
reintroduce the const char* overloads for Report::Text and
ReportEntry().

Add tests to check ReportEntry constructors with const char * and
std::string. Especially the new behavior when nullptr is passed as
text, which should be the only instance draw_a_line should be set to
true.

fixes: #115

In 9f10c00 main: report: remove custom DList, updates
the `Report::Text` function was switched to accept `std::string&` instead
of `const char*`. In the conversion the possibility of the char ptr to
be a nullptr was forgotten. A nullptr for text is interpreted as
`draw_a_line`. As `std::string` has no distinction between nullptr and
an empty string introduce the variable `bool draw_a_line` and
reintroduce the `const char*` overloads for `Report::Text` and
`ReportEntry()`.

Add tests to check ReportEntry constructors with `const char *` and
`std::string`. Especially the new behavior when `nullptr` is passed as
text, which should be the only instance `draw_a_line` should be set to
true.

fixes: #115
@NeroBurner
Copy link
Contributor Author

screenshots of the fixed tables

image

image

@GeneMosher GeneMosher merged commit 2a02a07 into master Jan 7, 2021
@GeneMosher
Copy link
Member

Excellent fix and explanation !! Much Appreciation and Gratitude to you, NeroBurner !!

@NeroBurner NeroBurner deleted the fix_report_table_header_line branch January 8, 2021 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Formatting issue: An extra line and line feed is issued at the top of some buttons

3 participants