MCPcopy
hub / github.com/g3n/engine / decNameArray

Method decNameArray

loader/collada/common.go:173–189  ·  view source on GitHub ↗
(start xml.StartElement, data []byte, source *Source)

Source from the content-addressed store, hash-verified

171}
172
173func (d *Decoder) decNameArray(start xml.StartElement, data []byte, source *Source) error {
174
175 narray := new(NameArray)
176 narray.Id = findAttrib(start, "id").Value
177 narray.Count, _ = strconv.Atoi(findAttrib(start, "count").Value)
178 source.ArrayElement = narray
179
180 // Allocates memory for array
181 narray.Data = make([]string, narray.Count, narray.Count)
182
183 // Reads the strings from the data
184 err := decStringSequence(data, narray.Data)
185 if err != nil {
186 return err
187 }
188 return nil
189}
190
191func (d *Decoder) decSourceTechniqueCommon(start xml.StartElement, source *Source) error {
192

Callers 1

decSourceMethod · 0.95

Calls 2

findAttribFunction · 0.85
decStringSequenceFunction · 0.85

Tested by

no test coverage detected