diff options
Diffstat (limited to 'cc/util.h')
-rw-r--r-- | cc/util.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cc/util.h b/cc/util.h new file mode 100644 index 0000000..6da3a69 --- /dev/null +++ b/cc/util.h @@ -0,0 +1,18 @@ +// Copyright 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CC_UTIL_H_ +#define CC_UTIL_H_ + +namespace cc { + +template<typename T> +T RoundUp(T n, T mul) +{ + return ((n + mul - 1) / mul) * mul; +} + +} // namespace cc + +#endif // CC_UTIL_H_ |