Do not generate trailing whitespaces.
[libfirm] / ir / adt / hashset.c
index 505baa5..4b1ea9f 100644 (file)
@@ -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 @@
  *  <li><b>GetKey(value)</b>   Extracts the key from a data value</li>
  *  <li><b>KeysEqual(hashset,key1,key2)</b>  Tests wether 2 keys are equal</li>
  *  <li><b>DO_REHASH</b>       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)</li>
  * </ul>
@@ -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;