--- deliantra/server/include/util.h 2018/11/17 23:33:18 1.126 +++ deliantra/server/include/util.h 2018/12/01 20:22:13 1.129 @@ -1,6 +1,7 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * + * Copyright (©) 2017,2018 Marc Alexander Lehmann / the Deliantra team * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * * Deliantra is free software: you can redistribute it and/or modify it under @@ -38,6 +39,8 @@ #include +#include + #include #include @@ -54,20 +57,6 @@ # define g_slice_free1(s,p) free ((p)) #endif -// use C0X decltype for auto declarations until ISO C++ sanctifies them (if ever) -#define auto(var,expr) decltype(expr) var = (expr) - -#if cplusplus_does_not_suck /* still sucks in codesize with gcc 6, although local types work now */ -// does not work for local types (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm) -template -static inline int array_length (const T (&arr)[N]) -{ - return N; -} -#else -#define array_length(name) (sizeof (name) / sizeof (name [0])) -#endif - // very ugly macro that basically declares and initialises a variable // that is in scope for the next statement only // works only for stuff that can be assigned 0 and converts to false @@ -618,6 +607,8 @@ { return strhsh (s); } + + typedef ska::power_of_two_hash_policy hash_policy; }; struct str_equal