diff options
author | truebrain <truebrain@openttd.org> | 2009-01-15 16:53:18 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2009-01-15 16:53:18 +0000 |
commit | 7eac17f5ea6db07e53b62dd74f07bc32d7d67596 (patch) | |
tree | ce6e72c35aed80ebf44287395bf63c0b1eb4b13d /bin/ai/library/queue/priority_queue/main.nut | |
parent | 103cd2a5ed5df7f166c2024e0e4e85d4790e3529 (diff) | |
download | openttd-7eac17f5ea6db07e53b62dd74f07bc32d7d67596.tar.xz |
(svn r15092) -Fix [NoAI]: make the library internal class name consistant with their directory name
Diffstat (limited to 'bin/ai/library/queue/priority_queue/main.nut')
-rw-r--r-- | bin/ai/library/queue/priority_queue/main.nut | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/ai/library/queue/priority_queue/main.nut b/bin/ai/library/queue/priority_queue/main.nut index bafc93ac5..feda89559 100644 --- a/bin/ai/library/queue/priority_queue/main.nut +++ b/bin/ai/library/queue/priority_queue/main.nut @@ -5,7 +5,7 @@ * Peek and Pop always return the current lowest value in the list. * Sort is done on insertion only. */ -class PriorityQueue +class Priority_Queue { _queue = null; _count = 0; @@ -56,7 +56,7 @@ class PriorityQueue function Exists(item); }; -function PriorityQueue::Insert(item, priority) +function Priority_Queue::Insert(item, priority) { /* Append dummy entry */ _queue.append(0); @@ -82,7 +82,7 @@ function PriorityQueue::Insert(item, priority) return true; } -function PriorityQueue::Pop() +function Priority_Queue::Pop() { if (_count == 0) return null; @@ -92,19 +92,19 @@ function PriorityQueue::Pop() return node[0]; } -function PriorityQueue::Peek() +function Priority_Queue::Peek() { if (_count == 0) return null; return _queue[_count - 1][0]; } -function PriorityQueue::Count() +function Priority_Queue::Count() { return _count; } -function PriorityQueue::Exists(item) +function Priority_Queue::Exists(item) { /* Brute-force find the item (there is no faster way, as we don't have the priority number) */ foreach (node in _queue) { |