[ScryMUD] SVN Commit Info r831 - in trunk/mud: grrmud/server lib/containers
scrymud at wanfear.com
scrymud at wanfear.com
Sat Jun 24 13:44:37 PDT 2006
Author: eroper
Date: 2006-06-24 13:44:36 -0700 (Sat, 24 Jun 2006)
New Revision: 831
Modified:
trunk/mud/grrmud/server/Filters.h
trunk/mud/grrmud/server/code_gen.cc
trunk/mud/grrmud/server/command4.cc
trunk/mud/grrmud/server/spells.h
trunk/mud/lib/containers/PtrArray.h
Log:
Added virtual destructors to classes the compiler was complaining about.
The code now builds and runs.
Modified: trunk/mud/grrmud/server/Filters.h
===================================================================
--- trunk/mud/grrmud/server/Filters.h 2006-06-22 01:46:37 UTC (rev 830)
+++ trunk/mud/grrmud/server/Filters.h 2006-06-24 20:44:36 UTC (rev 831)
@@ -40,6 +40,7 @@
public:
virtual int matches(const critter* pc, const critter* b) { USE_VARS; return TRUE; }
virtual const char* name() { return "CritterSelector"; }
+ virtual ~CritterSelector() { };
};
/** Matches None. */
@@ -47,6 +48,7 @@
public:
virtual int matches(const critter* pc, const critter* b) { USE_VARS; return FALSE; }
virtual const char* name() { return "SelectNone"; }
+ virtual ~SelectNone() { };
};
/** matches when pc is an NPC */
@@ -56,6 +58,7 @@
USE_VARS; return pc->isNPC();
}
virtual const char* name() { return "SelectNPC"; }
+ virtual ~SelectNPC() { };
};
/** matches when pc != b */
@@ -65,6 +68,7 @@
return pc == actor;
}
virtual const char* name() { return "SelectAreSame"; }
+ virtual ~SelectAreSame() { };
};
/** matches when pc is sleeping */
@@ -74,6 +78,7 @@
USE_VARS; return pc->isSleeping();
}
virtual const char* name() { return "SelectIsSleeping"; }
+ virtual ~SelectIsSleeping() { };
};
@@ -84,6 +89,7 @@
USE_VARS; return pc->isMeditating();
}
virtual const char* name() { return "SelectIsMeditating"; }
+ virtual ~SelectIsMeditating() { };
};
/** matches when pc is an NPC and is possessed. */
@@ -93,6 +99,7 @@
USE_VARS; return (pc->isNPC() && pc->isPossessed());
}
virtual const char* name() { return "SelectNPC_Possessed"; }
+ virtual ~SelectNPC_Possessed() { };
};
/** matches when pc is a PC. */
@@ -102,6 +109,7 @@
USE_VARS; return pc->isPc();
}
virtual const char* name() { return "SelectPC"; }
+ virtual ~SelectPC() { };
};
/** matches mobs who MAY SEE mob entry message. */
@@ -111,6 +119,7 @@
return (actor->isPc() || (pc->pc && !pc->PC_FLAGS.get(28)));
}
virtual const char* name() { return "SelectActorEntryMsgs"; }
+ virtual ~SelectActorEntryMsgs() { };
};
/** matches b if pc can see it. */
@@ -120,6 +129,7 @@
return actor->canDetect(*pc);
}
virtual const char* name() { return "SelectVisibleToActor"; }
+ virtual ~SelectVisibleToActor() { };
};
/** matches b if pc can see it. */
@@ -129,6 +139,7 @@
return pc->canDetect(*actor);
}
virtual const char* name() { return "CanDetectActor"; }
+ virtual ~SelectCanDetectActor() { };
};
/** returns true if pc cannot detect b's sneaking. */
@@ -136,6 +147,7 @@
public:
virtual int matches(const critter* pc, const critter* actor);
virtual const char* name() { return "SelectActorSneakWorked"; }
+ virtual ~SelectActorSneakWorked() { };
};
@@ -146,6 +158,7 @@
USE_VARS; return (pc->isPc() && pc->PC_FLAGS.get(14));
}
virtual const char* name() { return "SelectGetsInfo"; }
+ virtual ~SelectGetsInfo() { };
};
@@ -156,6 +169,7 @@
USE_VARS; return (pc->isUsingClient());
}
virtual const char* name() { return "SelectUsingClient"; }
+ virtual ~SelectUsingClient() { };
};
/** returns true if pc is NOT using the Hegemon Client */
@@ -165,6 +179,7 @@
USE_VARS; return (!pc->isUsingClient());
}
virtual const char* name() { return "SelectNotUsingClient"; }
+ virtual ~SelectNotUsingClient() { };
};
Modified: trunk/mud/grrmud/server/code_gen.cc
===================================================================
--- trunk/mud/grrmud/server/code_gen.cc 2006-06-22 01:46:37 UTC (rev 830)
+++ trunk/mud/grrmud/server/code_gen.cc 2006-06-24 20:44:36 UTC (rev 831)
@@ -464,6 +464,7 @@
"class ExeCmd {\n"
"public:\n"
" virtual int execute(CODE_GEN_EXE_HEADER) = 0; //pure virtual\n"
+ " virtual ~ExeCmd() { };\n"
"};\n");
cmd_array.Append("void initCmdsArray() {\n");
Modified: trunk/mud/grrmud/server/command4.cc
===================================================================
--- trunk/mud/grrmud/server/command4.cc 2006-06-22 01:46:37 UTC (rev 830)
+++ trunk/mud/grrmud/server/command4.cc 2006-06-24 20:44:36 UTC (rev 831)
@@ -3097,7 +3097,7 @@
object* o_ptr;
//reduce cur_in_game counts.
- while ( o_ptr = inv_cll.next() ) {
+ while ( (o_ptr = inv_cll.next()) ) {
recursive_init_unload(*o_ptr, 0);
if (obj_ptr->isModified()) {
@@ -3304,4 +3304,5 @@
pc.show("You must specify flagtype as: 'mob_flag', 'pc_flag', 'crit_flag', 'teach_flag' or 'shop_flag'.\n");
return -1;
}
-}// tog_mflag
+ return 0 ;
+}// tog_m
Modified: trunk/mud/grrmud/server/spells.h
===================================================================
--- trunk/mud/grrmud/server/spells.h 2006-06-22 01:46:37 UTC (rev 830)
+++ trunk/mud/grrmud/server/spells.h 2006-06-24 20:44:36 UTC (rev 831)
@@ -144,6 +144,7 @@
//virtual int getSpellTarget(int i_th, const String* target, critter& pc);
Spell() {}// gets rid of an error message in g++
+ virtual ~Spell() {};
virtual void setupSpell(int spelln, int spellp, char* act, char* divers,
char* spell_name,
Modified: trunk/mud/lib/containers/PtrArray.h
===================================================================
--- trunk/mud/lib/containers/PtrArray.h 2006-06-22 01:46:37 UTC (rev 830)
+++ trunk/mud/lib/containers/PtrArray.h 2006-06-24 20:44:36 UTC (rev 831)
@@ -35,7 +35,10 @@
#include <assert.h>
#include <string2.h>
+extern LogStream mudlog;
+extern int min(int i, int j);
+
/** An array of type class T pointers. Does bounds checking
* and will grow as needed.
*/
More information about the ScryMUD
mailing list