X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=ir%2Fadt%2Fhashset.c;h=4b1ea9faae15a7d2f99fd7294bc556e15dcecab9;hb=2cd4bf52da22ca873e2991dc183f29517b0cb014;hp=505baa589a0b193f4e9137c8aea72cbfad65ae97;hpb=1a26f4853c07d1ecd68a097409dd602edfe29eff;p=libfirm
diff --git a/ir/adt/hashset.c b/ir/adt/hashset.c
index 505baa589..4b1ea9faa 100644
--- a/ir/adt/hashset.c
+++ b/ir/adt/hashset.c
@@ -23,7 +23,6 @@
* @author Matthias Braun, inspiration from densehash from google sparsehash
* package
* @date 17.03.2007
- * @version $Id$
*
*
* You have to specialize this file by defining:
@@ -47,7 +46,7 @@
*
GetKey(value) Extracts the key from a data value
* KeysEqual(hashset,key1,key2) Tests wether 2 keys are equal
* DO_REHASH Instead of storing the hash-values, recalculate
- * them on demand from the datavalues. (usefull if
+ * them on demand from the datavalues. (useful if
* calculating the hash-values takes less time than
* a memory access)
*
@@ -84,7 +83,7 @@
#ifdef DO_REHASH
#define HashSetEntry ValueType
-#define EntrySetHash(entry,new_hash)
+#define EntrySetHash(entry,new_hash) (void)0
#define EntryGetHash(self,entry) Hash(self, GetKey(entry))
#define EntryGetValue(entry) (entry)
#else /* ! DO_REHASH */
@@ -219,8 +218,7 @@ size_t hashset_size(const HashSet *self)
* @note also see comments for hashset_insert()
* @internal
*/
-static inline
-InsertReturnValue insert_nogrow(HashSet *self, KeyType key)
+static inline InsertReturnValue insert_nogrow(HashSet *self, KeyType key)
{
size_t num_probes = 0;
size_t num_buckets = self->num_buckets;
@@ -270,8 +268,7 @@ InsertReturnValue insert_nogrow(HashSet *self, KeyType key)
* calculate shrink and enlarge limits
* @internal
*/
-static inline
-void reset_thresholds(HashSet *self)
+static inline void reset_thresholds(HashSet *self)
{
self->enlarge_threshold = (size_t) HT_OCCUPANCY_FLT(self->num_buckets);
self->shrink_threshold = (size_t) HT_EMPTY_FLT(self->num_buckets);
@@ -284,8 +281,7 @@ void reset_thresholds(HashSet *self)
* contains no deleted entries and the element doesn't exist in the hashset yet.
* @internal
*/
-static
-void insert_new(HashSet *self, unsigned hash, ValueType value)
+static void insert_new(HashSet *self, unsigned hash, ValueType value)
{
size_t num_probes = 0;
size_t num_buckets = self->num_buckets;
@@ -326,8 +322,7 @@ void insert_new(HashSet *self, unsigned hash, ValueType value)
* Resize the hashset
* @internal
*/
-static inline
-void resize(HashSet *self, size_t new_size)
+static inline void resize(HashSet *self, size_t new_size)
{
size_t num_buckets = self->num_buckets;
size_t i;
@@ -371,8 +366,7 @@ static inline void resize(HashSet *self, size_t new_size);
* grow the hashset if adding 1 more elements would make it too crowded
* @internal
*/
-static inline
-void maybe_grow(HashSet *self)
+static inline void maybe_grow(HashSet *self)
{
size_t resize_to;
@@ -388,8 +382,7 @@ void maybe_grow(HashSet *self)
* shrink the hashset if it is only sparsely filled
* @internal
*/
-static inline
-void maybe_shrink(HashSet *self)
+static inline void maybe_shrink(HashSet *self)
{
size_t size;
size_t resize_to;
@@ -516,8 +509,7 @@ void hashset_remove(HashSet *self, ConstKeyType key)
* Initializes hashset with a specific size
* @internal
*/
-static inline
-void init_size(HashSet *self, size_t initial_size)
+static inline void init_size(HashSet *self, size_t initial_size)
{
if (initial_size < 4)
initial_size = 4;