sources/basics.h

branch
protocol5
changeset 159
970d58a01e8b
parent 157
42bb29924218
child 161
1c483b54ddcb
--- a/sources/basics.h	Wed Jul 20 18:31:19 2016 +0300
+++ b/sources/basics.h	Fri Jul 22 17:59:55 2016 +0300
@@ -90,6 +90,11 @@
 	return (a < b) ? b : (a > c) ? c : a;
 }
 
+inline const char *plural(int value)
+{
+	return value != 1 ? "s" : "";
+}
+
 template <typename T, size_t N>
 char (&_ArraySizeHelper(T (&array)[N]))[N];
 #define countof(array) (sizeof(_ArraySizeHelper( array )))

mercurial