aboutsummaryrefslogtreecommitdiff
path: root/lout/misc.hh
diff options
context:
space:
mode:
Diffstat (limited to 'lout/misc.hh')
-rw-r--r--lout/misc.hh9
1 files changed, 9 insertions, 0 deletions
diff --git a/lout/misc.hh b/lout/misc.hh
index 05b87602..1f558814 100644
--- a/lout/misc.hh
+++ b/lout/misc.hh
@@ -167,6 +167,15 @@ public:
this->resize ();
}
+ inline void insert(int index, int numInsert) {
+ // TODO "transparent delay", for hyphenation
+ assert (numInsert >= 0);
+ this->num += numInsert;
+ this->resize ();
+ for (int i = this->num - 1; i >= index + numInsert; i--)
+ array[i] = array[i - numInsert];
+ }
+
/**
* \brief Set the size explicitly and initialize new values.
*