aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorPaweł Kołodziejski2009-02-19 18:11:05 +0000
committerPaweł Kołodziejski2009-02-19 18:11:05 +0000
commitade3c8f56551d01aad7fc7d4f710e3a19088392e (patch)
tree9480772319c3b5d553f0cd027530771b2fe92e40 /engines/sci/engine
parent4e052e4d1c07fc179416557dc4a34d0a0ade08b8 (diff)
downloadscummvm-rg350-ade3c8f56551d01aad7fc7d4f710e3a19088392e.tar.gz
scummvm-rg350-ade3c8f56551d01aad7fc7d4f710e3a19088392e.tar.bz2
scummvm-rg350-ade3c8f56551d01aad7fc7d4f710e3a19088392e.zip
formating
svn-id: r38556
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/int_hashmap.cpp9
-rw-r--r--engines/sci/engine/int_hashmap.h8
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