diff options
author | Karl Berry <karl@freefriends.org> | 2010-06-14 23:14:16 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-06-14 23:14:16 +0000 |
commit | c2175edc7aa44ca0b526f008d473d6f8a8ac4933 (patch) | |
tree | d6c491676b413ad1922481f8c3fc7b64c3afc0a5 /Build/source/utils/asymptote/array.cc | |
parent | 5d08e9ff4fe5fc836d237ea08e82c82b27d558a2 (diff) |
asy 1.98
git-svn-id: svn://tug.org/texlive/trunk@18982 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/array.cc')
-rw-r--r-- | Build/source/utils/asymptote/array.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Build/source/utils/asymptote/array.cc b/Build/source/utils/asymptote/array.cc index e0ee2145407..58c43710641 100644 --- a/Build/source/utils/asymptote/array.cc +++ b/Build/source/utils/asymptote/array.cc @@ -154,22 +154,19 @@ void array::setSlice(Int left, Int right, array *a) } } -item copyItemToDepth(item i, Int depth) +item copyItemToDepth(item i, size_t depth) { - assert(depth >= 0); - if (depth == 0 || !isarray(i)) + if (depth == 0) return i; else return get<array *>(i)->copyToDepth(depth); } -array *array::copyToDepth(Int depth) +array *array::copyToDepth(size_t depth) { - assert(depth >= 0); if (depth == 0) { return this; - } - else { + } else { size_t n=this->size(); array *a=new array(n); a->cycle = this->cycle; @@ -181,7 +178,7 @@ array *array::copyToDepth(Int depth) } } -array::array(size_t n, item i, Int depth) +array::array(size_t n, item i, size_t depth) : mem::vector<item>(n), cycle(false) { for (size_t k=0; k<n; ++k) |