sources/basics.h

changeset 157
42bb29924218
parent 114
0e7f3ecdf65a
child 161
1c483b54ddcb
--- a/sources/basics.h	Wed Jul 20 22:56:16 2016 +0300
+++ b/sources/basics.h	Fri Jul 22 17:50:00 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