mirror of https://github.com/nodejs/node.git
core: add ROUND_UP() macro
parent
9d1fde7519
commit
a58659cd4a
|
@ -42,6 +42,10 @@ namespace node {
|
|||
# define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0]))
|
||||
#endif
|
||||
|
||||
#ifndef ROUND_UP
|
||||
# define ROUND_UP(a, b) ((a) % (b) ? ((a) + (b)) - ((a) % (b)) : (a))
|
||||
#endif
|
||||
|
||||
// this would have been a template function were it not for the fact that g++
|
||||
// sometimes fails to resolve it...
|
||||
#define THROW_ERROR(fun) \
|
||||
|
|
Loading…
Reference in New Issue