Exemplo n.º 1
0
func Save(c core.Matcher, ls *persist.LoadSaver) {
	if c == nil {
		ls.SaveSmallInt(0)
		return
	}
	m := c.(*Matcher)
	ls.SaveSmallInt(len(m.riffs))
	if len(m.riffs) == 0 {
		return
	}
	for k, v := range m.riffs {
		ls.SaveFourCC(k)
		ls.SaveSmallInt(len(v))
		for _, w := range v {
			ls.SaveSmallInt(w)
		}
	}
	m.priorities.Save(ls)
}