(svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too

This commit is contained in:
rubidium
2009-03-15 00:32:18 +00:00
parent d72273d1f3
commit b25a4f8231
130 changed files with 1724 additions and 1727 deletions

View File

@@ -22,7 +22,7 @@ struct CHashTableSlotT
{
for (const Titem_ *pItem = m_pFirst; pItem != NULL; pItem = pItem->GetHashNext()) {
if (pItem->GetKey() == key) {
// we have found the item, return it
/* we have found the item, return it */
return pItem;
}
}
@@ -34,7 +34,7 @@ struct CHashTableSlotT
{
for (Titem_ *pItem = m_pFirst; pItem != NULL; pItem = pItem->GetHashNext()) {
if (pItem->GetKey() == key) {
// we have found the item, return it
/* we have found the item, return it */
return pItem;
}
}
@@ -74,22 +74,22 @@ struct CHashTableSlotT
/** hash table slot helper - remove and return item from a slot */
FORCEINLINE Titem_ *Detach(const Key& key)
{
// do we have any items?
/* do we have any items? */
if (m_pFirst == NULL) {
return NULL;
}
// is it our first item?
/* is it our first item? */
if (m_pFirst->GetKey() == key) {
Titem_& ret_item = *m_pFirst;
m_pFirst = m_pFirst->GetHashNext();
ret_item.SetHashNext(NULL);
return &ret_item;
}
// find it in the following items
/* find it in the following items */
Titem_ *pPrev = m_pFirst;
for (Titem_ *pItem = m_pFirst->GetHashNext(); pItem != NULL; pPrev = pItem, pItem = pItem->GetHashNext()) {
if (pItem->GetKey() == key) {
// we have found the item, unlink and return it
/* we have found the item, unlink and return it */
pPrev->SetHashNext(pItem->GetHashNext());
pItem->SetHashNext(NULL);
return pItem;
@@ -137,10 +137,10 @@ protected:
int m_num_items; // item counter
public:
// default constructor
/* default constructor */
FORCEINLINE CHashTableT()
{
// construct all slots
/* construct all slots */
m_slots = new Slot[Tcapacity];
m_num_items = 0;
}