summaryrefslogtreecommitdiff
path: root/src/lib/util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-11-14 20:04:15 +0000
committerCarl Hetherington <cth@carlh.net>2012-11-14 20:04:15 +0000
commit05c37b9bb09f7bfa4c2ec8ea6b3fa4a83d0fec20 (patch)
treefa7a3e408c2eb66b070864694b6af7e0787e508f /src/lib/util.cc
parent5161626c3c28ba528511a8b211286a5e81a0f02a (diff)
Tests pass again.
Diffstat (limited to 'src/lib/util.cc')
-rw-r--r--src/lib/util.cc10
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