Directly construct empty string for invalid SectionInfo

This commit is contained in:
Martin Hořeňovský 2023-02-19 23:56:27 +01:00
parent f04c93462b
commit 0477326ad9
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A

View File

@ -26,7 +26,7 @@ namespace Catch {
Section::Section( SourceLineInfo const& _lineInfo,
StringRef _name,
const char* const ):
m_info( { "invalid", static_cast<std::size_t>(-1) }, "" ),
m_info( { "invalid", static_cast<std::size_t>( -1 ) }, std::string{} ),
m_sectionIncluded(
getResultCapture().sectionStarted( _name, _lineInfo, m_assertions ) ) {
// We delay initialization the SectionInfo member until we know