]> www.ginac.de Git - cln.git/blobdiff - src/base/hash/cl_hash2.h
Fix compilation with clang.
[cln.git] / src / base / hash / cl_hash2.h
index 3f7a20fc9fea222358a3a5d0a4e1991c6b92872a..66593ae6d6294463e258abb051bf4231b71fe7c0 100644 (file)
@@ -3,8 +3,8 @@
 #ifndef _CL_HASH2_H
 #define _CL_HASH2_H
 
-#include "cl_hash.h"
-#include "cl_iterator.h"
+#include "base/hash/cl_hash.h"
+#include "base/cl_iterator.h"
 
 namespace cln {
 
@@ -47,7 +47,7 @@ public:
         var long index = this->_slots[hashcode(key1,key2) % this->_modulus] - 1;
         while (index >= 0) {
             if (!(index < this->_size))
-                cl_abort();
+                throw runtime_exception();
             if (equal(key1,this->_entries[index].entry.key1)
                 && equal(key2,this->_entries[index].entry.key2))
                 return &this->_entries[index].entry.val;
@@ -64,7 +64,7 @@ public:
             var long index = this->_slots[hcode % this->_modulus] - 1;
             while (index >= 0) {
                 if (!(index < this->_size))
-                    cl_abort();
+                    throw runtime_exception();
                 if (equal(key1,this->_entries[index].entry.key1)
                     && equal(key2,this->_entries[index].entry.key2)) {
                     this->_entries[index].entry.val = val;
@@ -89,7 +89,7 @@ public:
         while (*_index > 0) {
             var long index = *_index - 1;
             if (!(index < this->_size))
-                cl_abort();
+                throw runtime_exception();
             if (equal(key1,this->_entries[index].entry.key1)
                 && equal(key2,this->_entries[index].entry.key2)) {
                 // Remove _entries[index].entry
@@ -118,7 +118,7 @@ private:
         if (this->_freelist < -1)
             return;
         // Can we make room?
-        if (_garcol_fun(this))
+        if (this->_garcol_fun(this))
             if (this->_freelist < -1)
                 return;
         // No! Have to grow the hash table.
@@ -126,7 +126,7 @@ private:
       #else
         // workaround Sun C++ 4.1 inline function compiler bug
         if (this->_freelist >= -1) {
-            if (!_garcol_fun(this) || (this->_freelist >= -1))
+            if (!this->_garcol_fun(this) || (this->_freelist >= -1))
                 grow();
         }
       #endif