Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Core/Libraries/Source/WWVegas/WWLib/hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ int HashTableClass::Hash( const char * key )
void HashTableIteratorClass::First()
{
Index = 0;
NextEntry = Table.HashTable[ Index ];
NextEntry = nullptr;
Advance_Next();
Next(); // Accept the next we found, and go to the next next
}
Expand All @@ -148,11 +148,11 @@ void HashTableIteratorClass::Next()
void HashTableIteratorClass::Advance_Next()
{
while ( NextEntry == nullptr ) {
Index++;
if ( Index >= Table.HashTableSize ) {
return; // Done!
}
NextEntry = Table.HashTable[ Index ];
++Index;
}
}

Expand Down
2 changes: 1 addition & 1 deletion Core/Libraries/Source/WWVegas/WWLib/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class HashTableClass {
class HashTableIteratorClass
{
public:
HashTableIteratorClass( HashTableClass & table ) : Table( table ) {}
HashTableIteratorClass( HashTableClass & table ) : Table( table ) { First(); }
Comment thread
xezon marked this conversation as resolved.
virtual ~HashTableIteratorClass() {}

void First();
Expand Down