diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/int_hashmap.cpp | 9 | ||||
-rw-r--r-- | engines/sci/engine/int_hashmap.h | 8 |
2 files changed, 8 insertions, 9 deletions
diff --git a/engines/sci/engine/int_hashmap.cpp b/engines/sci/engine/int_hashmap.cpp index f3413d401e..cdca3e5e5b 100644 --- a/engines/sci/engine/int_hashmap.cpp +++ b/engines/sci/engine/int_hashmap.cpp @@ -67,7 +67,7 @@ int int_hash_map_t::check_value(int value, bool add, char *was_added) { if (*node) { return (*node)->value; } - /* Not found */ + // Not found if (!add) return -1; @@ -75,7 +75,7 @@ int int_hash_map_t::check_value(int value, bool add, char *was_added) { if (was_added) *was_added = 1; - if (holes) { /* Re-use old node */ + if (holes) { // Re-use old node (*node) = holes; holes = (*node)->next; (*node)->next = NULL; @@ -90,7 +90,6 @@ int int_hash_map_t::check_value(int value, bool add, char *was_added) { return (*node)->value; } - int int_hash_map_t::remove_value(int value) { node_t **node = &(nodes[HASH(value)]); @@ -101,10 +100,10 @@ int int_hash_map_t::remove_value(int value) { node_t *oldnode = *node; *node = (*node)->next; - oldnode->next = holes; /* Old node is now a 'hole' */ + oldnode->next = holes; // Old node is now a 'hole' holes = oldnode; return oldnode->value; } else - return -1; /* Not found */ + return -1; // Not found } diff --git a/engines/sci/engine/int_hashmap.h b/engines/sci/engine/int_hashmap.h index ac32ba4234..092ad4ffba 100644 --- a/engines/sci/engine/int_hashmap.h +++ b/engines/sci/engine/int_hashmap.h @@ -37,7 +37,7 @@ */ -/* Assumes that the ints are relatively evenly distributed */ +// Assumes that the ints are relatively evenly distributed #define DCS_INT_HASH_MAX 255 @@ -49,8 +49,8 @@ struct int_hash_map_t { node_t *next; }; - int base_value; /* Starts at zero, counts upwards */ - node_t *nodes[DCS_INT_HASH_MAX+1]; + int base_value; // Starts at zero, counts upwards + node_t *nodes[DCS_INT_HASH_MAX + 1]; node_t *holes; /* List of freed entries to minimize ** memory operations and modifications ** to base_value */ @@ -83,4 +83,4 @@ public: typedef int_hash_map_t *int_hash_map_ptr; -#endif /* INT_HASHMAP_H */ +#endif // INT_HASHMAP_H |