--- a/src/ai/api/ai_abstractlist.cpp Tue Feb 26 15:14:21 2008 +0000
+++ b/src/ai/api/ai_abstractlist.cpp Tue Feb 26 15:14:45 2008 +0000
@@ -530,7 +530,7 @@
void AIAbstractList::Valuate(const AIAbstractList::Valuator &proc)
{
- if (this->GetListName() != NULL && strcmp(this->GetListName(), proc.GetListName()) != 0) {
+ if (this->GetListName() != NULL && proc.GetListName() != NULL && strcmp(this->GetListName(), proc.GetListName()) != 0) {
DEBUG(ai, 0, "WARNING: You are trying to use a valuator for %s on a list which\n", this->GetListName());
DEBUG(ai, 0, " is based on %s. In general, this can't work. Expect fuzzy results!\n", proc.GetListName());
}
--- a/src/ai/api/ai_list_valuator.hpp Tue Feb 26 15:14:21 2008 +0000
+++ b/src/ai/api/ai_list_valuator.hpp Tue Feb 26 15:14:45 2008 +0000
@@ -23,7 +23,7 @@
/**
* The name of this list, to check if we can be used with a List.
*/
- const char *GetListName() const { return "AIList"; }
+ const char *GetListName() const { return NULL; }
int32 Valuate(int32 item) const;
};