freebsd-ports/games/pipenightdreams/files/patch-src__hash.cpp
Rusmir Dusko 0230fbbab4 - Bump PORTREVISION
- Take maintainership
- Remove leading article from COMMENT
- Add license (GPLv2)
- USES gmake instead of USE_GMAKE
- Disable all warnings with -w
- Support STAGEDIR
- Add DOCS and Option
- Add Desktop entry file
- Add and symlink the icon
- Recreate patches with make makepatch
- Recreate pkg-plist with make makeplist

PR:		ports/173880
Submitted by:	nemysis (self)
2014-02-02 00:20:09 +00:00

35 lines
767 B
C++

--- ./src/hash.cpp.orig 2002-01-17 20:56:30.000000000 +0100
+++ ./src/hash.cpp 2014-02-01 23:41:06.000000000 +0100
@@ -55,10 +55,12 @@
return(sum % nbuckets);
}
-Hash::Hash(int bs=256){
+typedef List *ListPtr;
+
+Hash::Hash(int bs){
int i;
nbuckets=bs;
- lbuckets=new (List *)[nbuckets];
+ lbuckets=new ListPtr[nbuckets];
for (i=0;i<nbuckets;i++)
lbuckets[i]=new List();
@@ -99,7 +101,7 @@
return NotAdded;
}
-Hash::Result Hash::remove(Str * str, bool del=false){
+Hash::Result Hash::remove(Str * str, bool del){
if (str){
Index * i;
List * list=lbuckets[function(str)];
@@ -135,7 +137,7 @@
return NULL;
}
-void Hash::empty(bool del=true){
+void Hash::empty(bool del){
int i;
List * list;
for (i=0;i<nbuckets;i++){