Use DO_ASSERT() instead of assert() thoughout tread.cpp and twrite.cpp

This commit is contained in:
Joachim Schmitz 2023-04-26 12:24:28 +02:00 committed by Igor Korsukov
parent 56f7aaa776
commit 0f81eb0de1
2 changed files with 3 additions and 3 deletions

View file

@ -444,7 +444,7 @@ bool TRead::readItemProperties(EngravingItem* item, XmlReader& e, ReadContext&)
}
}
#endif
assert(!item->links()->contains(item));
DO_ASSERT(!item->links()->contains(item));
item->links()->push_back(item);
} else if (tag == "tick") {
int val = e.readInt();

View file

@ -289,7 +289,7 @@ void TWrite::writeItemProperties(const EngravingItem* item, XmlWriter& xml, Writ
}
EngravingItem* me = static_cast<EngravingItem*>(item->links()->mainElement());
assert(item->type() == me->type());
DO_ASSERT(item->type() == me->type());
Staff* s = item->staff();
if (!s) {
s = item->score()->staff(xml.context()->curTrack() / VOICES);
@ -1783,7 +1783,7 @@ void TWrite::write(const Location* item, XmlWriter& xml, WriteContext&)
{
static constexpr Location relDefaults = Location::relative();
assert(item->isRelative());
DO_ASSERT(item->isRelative());
xml.startElement("location");
xml.tag("staves", item->staff(), relDefaults.staff());
xml.tag("voices", item->voice(), relDefaults.voice());