10 // Is this still needed? (Lgb)
12 void * my_memcpy(void * ps_in, void const * pt_in, size_t n)
14 char * ps = static_cast<char *>(ps_in);
15 char const * pt = static_cast<char const *>(pt_in);
16 while (n--) *ps++ = *pt++;
21 MathedArray::MathedArray(int size)
24 int const newsize = (size < ARRAY_MIN_SIZE) ? ARRAY_MIN_SIZE : size;
29 MathedArray::iterator MathedArray::begin()
35 MathedArray::iterator MathedArray::end()
41 MathedArray::const_iterator MathedArray::begin() const
47 MathedArray::const_iterator MathedArray::end() const
53 int MathedArray::empty() const
59 int MathedArray::last() const
65 void MathedArray::last(int l)
71 void MathedArray::need_size(int needed)
73 if (needed >= static_cast<int>(bf_.size()))
78 void MathedArray::resize(int newsize)
80 if (newsize < ARRAY_MIN_SIZE)
81 newsize = ARRAY_MIN_SIZE;
82 newsize += ARRAY_STEP - (newsize % ARRAY_STEP);
90 void MathedArray::move(int p, int shift)
93 need_size(last_ + shift);
94 memmove(&bf_[p + shift], &bf_[p], last_ - p);
102 void MathedArray::insert(MathedArray::iterator pos,
103 MathedArray::const_iterator beg,
104 MathedArray::const_iterator end)
106 bf_.insert(pos, beg, end);
107 last_ = bf_.size() - 1;
110 void MathedArray::mergeF(MathedArray * a, int p, int dx)
112 my_memcpy(&bf_[p], &a->bf_[0], dx);
117 void MathedArray::raw_pointer_copy(MathedInset ** p, int pos) const
119 my_memcpy(p, &bf_[pos], sizeof(MathedInset*));
123 void MathedArray::raw_pointer_insert(void * p, int pos, int len)
125 my_memcpy(&bf_[pos], &p, len);
129 void MathedArray::strange_copy(MathedArray * dest, int dpos,
132 my_memcpy(&dest->bf_[dpos], &bf_[spos], len);
136 byte MathedArray::operator[](int i) const
142 byte & MathedArray::operator[](int i)