diff --git a/util.d b/util.d index 0a15129..f358db0 100644 --- a/util.d +++ b/util.d @@ -23,6 +23,17 @@ Int3() } } +pragma(inline) bool +CondIncr(T, i64 step)(bool cond, T* val) +{ + if(cond) + { + *val += step; + } + + return cond; +} + T[] CastStr(T)(string str) {