diff options
author | chatty | 1995-03-13 15:03:50 +0000 |
---|---|---|
committer | chatty | 1995-03-13 15:03:50 +0000 |
commit | 695304d5aa8235993b35f933dd44339e68b211e4 (patch) | |
tree | b61418a94e522e373b3fb905cc2519b788be3179 | |
parent | e63a37896804d4c483512f460931793a5188ee1c (diff) | |
download | ivy-league-695304d5aa8235993b35f933dd44339e68b211e4.zip ivy-league-695304d5aa8235993b35f933dd44339e68b211e4.tar.gz ivy-league-695304d5aa8235993b35f933dd44339e68b211e4.tar.bz2 ivy-league-695304d5aa8235993b35f933dd44339e68b211e4.tar.xz |
unsigned long -> size_t (finally!)
-rw-r--r-- | utils/DList.cc | 8 | ||||
-rw-r--r-- | utils/DList.h | 5 | ||||
-rw-r--r-- | utils/HashTable.cc | 6 | ||||
-rw-r--r-- | utils/HashTable.h | 10 | ||||
-rw-r--r-- | utils/List.cc | 8 | ||||
-rw-r--r-- | utils/List.h | 5 | ||||
-rw-r--r-- | utils/SmartPointer.cc | 4 | ||||
-rw-r--r-- | utils/SmartPointer.h | 6 |
8 files changed, 29 insertions, 23 deletions
diff --git a/utils/DList.cc b/utils/DList.cc index 97d6539..9ccae7b 100644 --- a/utils/DList.cc +++ b/utils/DList.cc @@ -3,7 +3,7 @@ * * by Stephane Chatty * - * Copyright 1992 + * Copyright 1992-1995 * Centre d'Etudes de la Navigation Aerienne (CENA) * * plain and generic double-linked lists (original ideas by Yves Berteaud) @@ -37,7 +37,7 @@ public: CcuDListLink* Next; inline CcuDListLink (CcuDListItem* e, CcuDListLink* p) : Entry (e), Previous (p), Next (p->Next) { Previous->Next = Next->Previous = this; } inline CcuDListLink (CcuDListItem* e) : Entry (e), Previous (this), Next (this) {} - void* operator new (unsigned long); + void* operator new (size_t); void operator delete (void*); }; #endif @@ -52,9 +52,9 @@ CcuAllocator* CcuDList::CcuDListLink::DListLinkMem = 0; /*?nodoc?*/ void* #ifdef CPLUS_BUG20 -CcuDListLink :: operator new (unsigned long) +CcuDListLink :: operator new (size_t) #else -CcuDList::CcuDListLink :: operator new (unsigned long) +CcuDList::CcuDListLink :: operator new (size_t) #endif { if (!DListLinkMem) diff --git a/utils/DList.h b/utils/DList.h index 3c84753..cba72f1 100644 --- a/utils/DList.h +++ b/utils/DList.h @@ -3,7 +3,7 @@ * * by Stephane Chatty * - * Copyright 1992 + * Copyright 1992-1995 * Centre d'Etudes de la Navigation Aerienne (CENA) * * plain and generic double-linked lists (original ideas by Yves Berteaud) @@ -16,6 +16,7 @@ #define DList_H_ #include "cplus_bugs.h" +#include <sys/types.h> class CcuAllocator; @@ -37,7 +38,7 @@ friend class CcuDListIter; CcuDListLink* Next; inline CcuDListLink (CcuDListItem* e, CcuDListLink* p) : Entry (e), Previous (p), Next (p->Next) { Previous->Next = Next->Previous = this; } inline CcuDListLink (CcuDListItem* e) : Entry (e), Previous (this), Next (this) {} - void* operator new (unsigned long); + void* operator new (size_t); void operator delete (void*); }; #endif diff --git a/utils/HashTable.cc b/utils/HashTable.cc index 44bc557..d1c4b51 100644 --- a/utils/HashTable.cc +++ b/utils/HashTable.cc @@ -3,7 +3,7 @@ * * by Stephane Chatty * - * Copyright 1991, 1992 + * Copyright 1991-1995 * Laboratoire de Recherche en Informatique (LRI) * Centre d'Etudes de la Navigation Aerienne (CENA) * @@ -73,7 +73,7 @@ CcuHashCell :: ClassInit () /*?nodoc?*/ void* -CcuHashCell :: operator new (unsigned long) +CcuHashCell :: operator new (size_t) { return HashCellMem->Alloc (); } @@ -550,7 +550,7 @@ CcuDictionnary :: CopyString (const void* k) /*?hidden?*/ void -CcuDictionnary :: DeleteString (void* k) +CcuDictionnary :: DeleteString (const void* k) { FreeString ((char*) k); } diff --git a/utils/HashTable.h b/utils/HashTable.h index c30e5c7..2db7b93 100644 --- a/utils/HashTable.h +++ b/utils/HashTable.h @@ -3,7 +3,7 @@ * * by Stephane Chatty * - * Copyright 1991, 1992 + * Copyright 1991-1995 * Laboratoire de Recherche en Informatique (LRI) * Centre d'Etudes de la Navigation Aerienne (CENA) * @@ -19,6 +19,7 @@ #include "cplus_bugs.h" +#include <sys/types.h> class CcuAllocator; @@ -42,7 +43,7 @@ inline void SetInfo (CcuHashItem* p) { Info = p; } inline CcuHashItem* GetInfo () const { return Info; } inline const void* GetKey () const { return Key; } - void* operator new (unsigned long); + void* operator new (size_t); void operator delete (void*); }; @@ -106,7 +107,7 @@ inline int GetSize () const { return Size; } class CcuDictionnary : public CcuHashTable { protected: static void* CopyString (const void*); -static void DeleteString (void*); +static void DeleteString (const void*); static int CompareString (const void*, const void*); @@ -147,7 +148,8 @@ public: inline CcuHashIter (const CcuHashTable& t) : CcuHashCellIter (t) { } inline ~CcuHashIter () {} -inline CcuHashIter& operator ++ () { ++((CcuHashCellIter) (*this)); return *this; } +//inline CcuHashIter& operator ++ () { ++((CcuHashCellIter) (*this)); return *this; } +inline CcuHashIter& operator ++ () { return (CcuHashIter&)(this->CcuHashCellIter::operator ++ ()); } inline CcuHashItem* operator * () const { return CurCell ? CurCell->GetInfo () : 0; } }; diff --git a/utils/List.cc b/utils/List.cc index 4c4db23..7d47157 100644 --- a/utils/List.cc +++ b/utils/List.cc @@ -3,7 +3,7 @@ * * by Stephane Chatty * - * Copyright 1992 + * Copyright 1992-1995 * Centre d'Etudes de la Navigation Aerienne (CENA) * * plain and generic lists (original ideas by Yves Berteaud) @@ -36,7 +36,7 @@ public: CcuListLink* Next; inline CcuListLink (CcuListItem* e, CcuListLink* n = 0) { Entry = e; Next = n ? n : this; } CcuListLink* Previous (); - void* operator new (unsigned long); + void* operator new (size_t); void operator delete (void*); }; #endif @@ -52,9 +52,9 @@ CcuAllocator* CcuList::CcuListLink::ListLinkMem = 0; /*?nodoc?*/ void* #ifdef CPLUS_BUG20 -CcuListLink :: operator new (unsigned long) +CcuListLink :: operator new (size_t) #else -CcuList::CcuListLink :: operator new (unsigned long) +CcuList::CcuListLink :: operator new (size_t) #endif { if (!ListLinkMem) diff --git a/utils/List.h b/utils/List.h index cd042f9..de0e1d5 100644 --- a/utils/List.h +++ b/utils/List.h @@ -3,7 +3,7 @@ * * by Stephane Chatty * - * Copyright 1992-1993 + * Copyright 1992-1995 * Centre d'Etudes de la Navigation Aerienne (CENA) * * plain and generic lists (original ideas by Yves Berteaud) @@ -20,6 +20,7 @@ #endif #include "cplus_bugs.h" +#include <sys/types.h> class CcuAllocator; @@ -40,7 +41,7 @@ friend class CcuListIter; CcuListLink* Next; inline CcuListLink (CcuListItem* e, CcuListLink* n = 0) { Entry = e; Next = n ? n : this; } CcuListLink* Previous (); - void* operator new (unsigned long); + void* operator new (size_t); void operator delete (void*); }; #endif diff --git a/utils/SmartPointer.cc b/utils/SmartPointer.cc index 2ff5539..50343df 100644 --- a/utils/SmartPointer.cc +++ b/utils/SmartPointer.cc @@ -3,7 +3,7 @@ * * by Stephane Chatty * - * Copyright 1990, 1991, 1992 + * Copyright 1990-1995 * Laboratoire de Recherche en Informatique (LRI) * Centre d'Etudes de la Navigation Aerienne (CENA) * @@ -60,7 +60,7 @@ works well only if the constructor is called right after operator new, which is always the case... !*/ void* -CcuSmartData :: operator new (unsigned long size) +CcuSmartData :: operator new (size_t size) { #ifdef OLD NextCreatedIsDynamic = 1; diff --git a/utils/SmartPointer.h b/utils/SmartPointer.h index 37c78ee..1939327 100644 --- a/utils/SmartPointer.h +++ b/utils/SmartPointer.h @@ -3,7 +3,7 @@ * * by Stephane Chatty * - * Copyright 1990, 1991, 1992 + * Copyright 1990-1995 * Laboratoire de Recherche en Informatique (LRI) * Centre d'Etudes de la Navigation Aerienne (CENA) * @@ -21,6 +21,8 @@ #endif #include "cplus_bugs.h" +#include <sys/types.h> + class CcuList; class CcuSmartData { @@ -40,7 +42,7 @@ static CcuList* LastDynamics; #endif public: - void* operator new (unsigned long); + void* operator new (size_t); inline void operator delete (void* that) { ::delete (that); } CcuSmartData (); |