lkml.org 
[lkml]   [2006]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: C++ pushback
> #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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-28 17:50    [W:0.172 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site