Fix event notes not getting populated.

This commit is contained in:
Isaac Connor 2021-03-04 11:12:27 -05:00
parent f986b6a5e2
commit 5259b78065
1 changed files with 9 additions and 13 deletions

View File

@ -273,20 +273,16 @@ Event::~Event() {
} // Event::~Event()
void Event::createNotes(std::string &notes) {
if ( !notes.empty() ) {
notes.clear();
for ( StringSetMap::const_iterator mapIter = noteSetMap.begin(); mapIter != noteSetMap.end(); ++mapIter ) {
notes += mapIter->first;
notes += ": ";
const StringSet &stringSet = mapIter->second;
for ( StringSet::const_iterator setIter = stringSet.begin(); setIter != stringSet.end(); ++setIter ) {
if ( setIter != stringSet.begin() )
notes += ", ";
notes += *setIter;
}
notes.clear();
for ( StringSetMap::const_iterator mapIter = noteSetMap.begin(); mapIter != noteSetMap.end(); ++mapIter ) {
notes += mapIter->first;
notes += ": ";
const StringSet &stringSet = mapIter->second;
for ( StringSet::const_iterator setIter = stringSet.begin(); setIter != stringSet.end(); ++setIter ) {
if ( setIter != stringSet.begin() )
notes += ", ";
notes += *setIter;
}
} else {
notes = "";
}
} // void Event::createNotes(std::string &notes)