diff options
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 219441865..5e82650a5 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -620,12 +620,18 @@ Rect::intersection (Rect const & other) const */ int -round_up (int a, int t) +stride_round_up (int c, int const * stride, int t) { - a += (t - 1); + int const a = stride[c] + (t - 1); return a - (a % t); } +int +stride_lookup (int c, int const * stride) +{ + return stride[c]; +} + /** Read a sequence of key / value pairs from a text stream; * the keys are the first words on the line, and the values are * the remainder of the line following the key. Lines beginning |
