{
// Should NEVER be
long k = (long) key;
- if (k < 0)
- k = -k;
int position = (int) (k % n);
+ if (position < 0) position = -position;
+
if (!hash_table[position])
{
hash_table[position] = new wxList (wxKEY_INTEGER);
void wxHashTable::Put (long key, const wxChar *value, wxObject * object)
{
// Should NEVER be
- long k = (long) key;
- if (k < 0)
- k = -k;
+ long k = (long) key;
int position = (int) (k % n);
+ if (position < 0) position = -position;
+
if (!hash_table[position])
{
hash_table[position] = new wxList (wxKEY_INTEGER);
{
// Should NEVER be
long k = (long) key;
- if (k < 0)
- k = -k;
-
+
int position = (int) (k % n);
+ if (position < 0) position = -position;
+
if (!hash_table[position])
{
hash_table[position] = new wxList (wxKEY_INTEGER);
void wxHashTable::Put (const wxChar *key, wxObject * object)
{
int position = (int) (MakeKey (key) % n);
+ if (position < 0) position = -position;
if (!hash_table[position])
{
{
// Should NEVER be
long k = (long) key;
- if (k < 0)
- k = -k;
int position = (int) (k % n);
+ if (position < 0) position = -position;
+
if (!hash_table[position])
return (wxObject *) NULL;
else
{
// Should NEVER be
long k = (long) key;
- if (k < 0)
- k = -k;
-
+
int position = (int) (k % n);
+ if (position < 0) position = -position;
+
if (!hash_table[position])
return (wxObject *) NULL;
else
{
// Should NEVER be
long k = (long) key;
- if (k < 0)
- k = -k;
int position = (int) (k % n);
+ if (position < 0) position = -position;
+
if (!hash_table[position])
return (wxObject *) NULL;
else
wxObject *wxHashTable::Get (const wxChar *key) const
{
int position = (int) (MakeKey (key) % n);
+ if (position < 0) position = -position;
if (!hash_table[position])
return (wxObject *) NULL;
{
// Should NEVER be
long k = (long) key;
- if (k < 0)
- k = -k;
int position = (int) (k % n);
+ if (position < 0) position = -position;
+
if (!hash_table[position])
return (wxObject *) NULL;
else
wxObject *wxHashTable::Delete (const wxChar *key)
{
int position = (int) (MakeKey (key) % n);
+ if (position < 0) position = -position;
+
if (!hash_table[position])
return (wxObject *) NULL;
else
wxObject *wxHashTable::Delete (long key, int value)
{
// Should NEVER be
- long k = (long) key;
- if (k < 0)
- k = -k;
+ long k = (long) key;
int position = (int) (k % n);
+ if (position < 0) position = -position;
+
if (!hash_table[position])
return (wxObject *) NULL;
else
wxObject *wxHashTable::Delete (long key, const wxChar *value)
{
int position = (int) (key % n);
+ if (position < 0) position = -position;
+
if (!hash_table[position])
return (wxObject *) NULL;
else