~ubuntu-branches/ubuntu/oneiric/faac/oneiric

« back to all changes in this revision

Viewing changes to common/mp4v2/mp4array.h

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2011-06-09 12:00:51 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110609120051-03a45t9zrp0xiu9k
Tags: 1.28-0ubuntu1
* New upstream release. Package based on Debian Multimedia team git.
  (LP: #395902)
* debian/copyright documents all applicable licenses. The package as a whole
  is not LGPL and will stay in multiverse. (LP: #374900)
* Back to using a bundled internal copy of libmp4v2 in the frontend. The
  external libmp4v2 will eventually be removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
                        if (!ValidIndex(index)) { \
90
90
                                throw new MP4Error(ERANGE, "MP4Array::Delete"); \
91
91
                        } \
92
 
                        memmove(&m_elements[index], &m_elements[index + 1], \
93
 
                                (m_numElements - index) * sizeof(type)); \
94
92
                        m_numElements--; \
 
93
                        if (index < m_numElements) { \
 
94
                          memmove(&m_elements[index], &m_elements[index + 1], \
 
95
                                  (m_numElements - index) * sizeof(type)); \
 
96
                        } \
95
97
                } \
96
98
                void Resize(MP4ArrayIndex newSize) { \
97
99
                        m_numElements = newSize; \
102
104
                \
103
105
                type& operator[](MP4ArrayIndex index) { \
104
106
                        if (!ValidIndex(index)) { \
105
 
                                throw new MP4Error(ERANGE, "MP4Array::[]"); \
 
107
                                throw new MP4Error(ERANGE, "index %u of %u", "MP4Array::[]", index, m_numElements); \
106
108
                        } \
107
109
                        return m_elements[index]; \
108
110
                } \