mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
formating
svn-id: r38556
This commit is contained in:
parent
4e052e4d1c
commit
ade3c8f565
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user