1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Obliterate hsBool

This commit is contained in:
2012-07-11 01:28:00 -04:00
parent 5f78b33db4
commit a709e17069
1041 changed files with 7889 additions and 8070 deletions

View File

@ -100,7 +100,7 @@ void hsStringTable::Register(const char* str, void* data)
// Iterate through the tree and call the callback function on each child node
// of the fromNode (or the root if fromNode is nil)
//
hsBool hsStringTable::Iterate(hsStringTableCallback* callback, Node* fromNode)
bool hsStringTable::Iterate(hsStringTableCallback* callback, Node* fromNode)
{
if (!fromNode)
fromNode = &root;
@ -110,7 +110,7 @@ hsBool hsStringTable::Iterate(hsStringTableCallback* callback, Node* fromNode)
//
// Recursively find node, create if needed?
//
hsStringTable::Node* hsStringTable::FindRecur(Node* root, const char* str, hsBool createIfNeeded)
hsStringTable::Node* hsStringTable::FindRecur(Node* root, const char* str, bool createIfNeeded)
{
if (!root || !str) return nil;
if (tolower(root->chr)==tolower(*str))
@ -216,7 +216,7 @@ void hsStringTable::RemoveNode(Node* root)
//
// Recurse through tree and call callback on each node
//
hsBool hsStringTable::IterateRecur(Node* root, hsStringTableCallback* callback)
bool hsStringTable::IterateRecur(Node* root, hsStringTableCallback* callback)
{
if (!root)
return true;

View File

@ -69,15 +69,15 @@ public:
Node* FindPartial(char* str, int32_t len=0) const;
void Register(const char* str, void* data);
typedef hsBool (hsStringTableCallback)(Node*);
hsBool Iterate(hsStringTableCallback* callback, Node* fromNode=nil);
typedef bool (hsStringTableCallback)(Node*);
bool Iterate(hsStringTableCallback* callback, Node* fromNode=nil);
private:
Node* FindRecur(Node* root, const char* str, hsBool createIfNeeded=false);
Node* FindRecur(Node* root, const char* str, bool createIfNeeded=false);
Node* FindPartialRecur(Node* root, char* str, int32_t len) const;
Node* AddRecur(Node* root, const char* str);
Node* FindLeafRecur(Node* root, char* str, int32_t len) const;
void RemoveNode(Node* root);
hsBool IterateRecur(Node* root, hsStringTableCallback* callback);
bool IterateRecur(Node* root, hsStringTableCallback* callback);
Node root;
};