Fix VFileContent reference count (#5769) (#5771)

This commit is contained in:
Dave Sargeant 2025-02-10 15:04:04 +00:00 committed by GitHub
parent aa3942ab24
commit caa19c0cb3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View File

@ -38,6 +38,7 @@ Daniel Bates
David Horton David Horton
David Ledger David Ledger
David Metz David Metz
Dave Sargeant
David Stanford David Stanford
David Turner David Turner
Dercury Dercury

View File

@ -183,6 +183,19 @@ public:
, m_filenameno{singleton().nameToNumber(filename)} , m_filenameno{singleton().nameToNumber(filename)}
, m_waive{false} , m_waive{false}
, m_contentLineno{0} {} , m_contentLineno{0} {}
explicit FileLine(const FileLine& from)
: m_msgEnIdx{from.m_msgEnIdx}
, m_filenameno{from.m_filenameno}
, m_waive{from.m_waive}
, m_contentLineno{from.m_contentLineno}
, m_firstLineno{from.m_firstLineno}
, m_firstColumn{from.m_firstColumn}
, m_lastLineno{from.m_lastLineno}
, m_lastColumn{from.m_lastColumn}
, m_contentp{from.m_contentp}
, m_parent{from.m_parent} {
if (m_contentp) m_contentp->refInc();
}
explicit FileLine(FileLine* fromp) explicit FileLine(FileLine* fromp)
: m_msgEnIdx{fromp->m_msgEnIdx} : m_msgEnIdx{fromp->m_msgEnIdx}
, m_filenameno{fromp->m_filenameno} , m_filenameno{fromp->m_filenameno}