summaryrefslogtreecommitdiff
path: root/graphics/asymptote/array.h
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-08-07 03:02:55 +0000
committerNorbert Preining <norbert@preining.info>2020-08-07 03:02:55 +0000
commit3710c23789342d9d88783cbe9ad23eb5263a7c33 (patch)
tree1c40b2bfb9f6b652f7877ad0991f5d6b44391154 /graphics/asymptote/array.h
parentd99fea72e367e8d4d2809b43b3b0206b1bb526b8 (diff)
CTAN sync 202008070302
Diffstat (limited to 'graphics/asymptote/array.h')
-rw-r--r--graphics/asymptote/array.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/graphics/asymptote/array.h b/graphics/asymptote/array.h
index cc39141768..0fd353b2e1 100644
--- a/graphics/asymptote/array.h
+++ b/graphics/asymptote/array.h
@@ -1,7 +1,7 @@
/*****
* array.h
* Tom Prince 2005/06/18
- *
+ *
* Array type used by virtual machine.
*****/
@@ -18,13 +18,13 @@ extern const char *dereferenceNullArray;
// Arrays are vectors with push and pop functions.
class array : public mem::vector<item> {
- bool cycle;
+ bool cycle;
void setNonBridgingSlice(size_t l, size_t r, mem::vector<item> *a);
void setBridgingSlice(size_t l, size_t r, mem::vector<item> *a);
public:
array() : cycle(false) {}
-
+
array(size_t n)
: mem::vector<item>(n), cycle(false)
{}
@@ -48,14 +48,14 @@ public:
{
return get<T>((*this)[i]);
}
-
+
array *slice(Int left, Int right);
void setSlice(Int left, Int right, array *a);
void cyclic(bool b) {
cycle=b;
}
-
+
bool cyclic() const {
return cycle;
}
@@ -89,14 +89,14 @@ inline void checkEqual(size_t i, size_t j) {
vm::error(buf);
}
-inline size_t checkArrays(const vm::array *a, const vm::array *b)
+inline size_t checkArrays(const vm::array *a, const vm::array *b)
{
size_t asize=checkArray(a);
size_t bsize=checkArray(b);
checkEqual(asize,bsize);
return asize;
}
-
+
// Copies an item to a depth d. If d == 0 then the item is just returned
// without copying, otherwise, the array and its subarrays are copied to
// depth d.