Re: C++ pushback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> #include <cassert>
>
> template <typename Key, class Value, class Traits>
> class Hashtable
> {
> public:
> class Link {

Does not match CodingStyle. SCNR.

>   assert((_size & (_size -  1)) == 0);

Names with underscores are usually reserved.

> // example program
>
> static unsigned hash(const char* key)
> {
> // assume this is jenkin's hash.
> unsigned h = 0;
> while (*key) {
> h = (h << 3) | (h >> 29);
> h ^= (unsigned char)*key++;

No const_cast<> and static_cast<> here?



Jan Engelhardt
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux