overmapbuffer::t_notes_vector overmapbuffer::get_notes(int z, const std::string* pattern) const { t_notes_vector result; for(std::list<overmap>::const_iterator it = overmap_list.begin(); it != overmap_list.end(); ++it) { const overmap &om = *it; const int offset_x = om.pos().x * OMAPX; const int offset_y = om.pos().y * OMAPY; for (int i = 0; i < OMAPX; i++) { for (int j = 0; j < OMAPY; j++) { const std::string ¬e = om.note(i, j, z); if (note.empty()) { continue; } if (pattern != NULL && note.find(*pattern) == std::string::npos) { // pattern not found in note text continue; } result.push_back(t_point_with_note( point(offset_x + i, offset_y + j), om.note(i, j, z) )); } } } return result; }
overmapbuffer::t_notes_vector overmapbuffer::get_notes(int z, const std::string* pattern) { t_notes_vector result; for( auto &it : overmaps ) { const overmap &om = *it.second; const int offset_x = om.pos().x * OMAPX; const int offset_y = om.pos().y * OMAPY; for (int i = 0; i < OMAPX; i++) { for (int j = 0; j < OMAPY; j++) { const std::string ¬e = om.note(i, j, z); if (note.empty()) { continue; } if (pattern != NULL && lcmatch( note, *pattern ) ) { // pattern not found in note text continue; } result.push_back(t_point_with_note( point(offset_x + i, offset_y + j), om.note(i, j, z) )); } } } return result; }