summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5319ffc)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4665
48e7efb5-ca39-0410-a469-
dd3cf9ba447f
_xbt_dynar_insert_at_ptr(xbt_dynar_t const dynar,
const int idx) {
void *res;
_xbt_dynar_insert_at_ptr(xbt_dynar_t const dynar,
const int idx) {
void *res;
+ unsigned long old_used;
+ unsigned long new_used;
+ unsigned long nb_shift;
_sanity_check_dynar(dynar);
_sanity_check_idx(idx);
_check_sloppy_inbound_idx(dynar, idx);
_sanity_check_dynar(dynar);
_sanity_check_idx(idx);
_check_sloppy_inbound_idx(dynar, idx);
- const unsigned long old_used = dynar->used;
- const unsigned long new_used = old_used + 1;
+ old_used = dynar->used;
+ new_used = old_used + 1;
_xbt_dynar_expand(dynar, new_used);
_xbt_dynar_expand(dynar, new_used);
- const unsigned long nb_shift = old_used - idx;
+ nb_shift = old_used - idx;
if (nb_shift)
memmove(_xbt_dynar_elm(dynar, idx+1),
if (nb_shift)
memmove(_xbt_dynar_elm(dynar, idx+1),
_dynar_unlock(dynar);
THROW2(not_found_error,0,"Element %p not part of dynar %p",elem,dynar);
_dynar_unlock(dynar);
THROW2(not_found_error,0,"Element %p not part of dynar %p",elem,dynar);
}
/** @brief Returns a boolean indicating whether the element is part of the dynar */
}
/** @brief Returns a boolean indicating whether the element is part of the dynar */