#JustT3DThings

Because it's not supposed to just work, right?


Pop Quiz: What's the type of `remove`?

template <class T>
inline T* SparseArray<T>::remove(U32 key)
{
   U32 remove  = key % mModulus;
   Node* probe = &mSentryTables[remove];
   while (probe->next != NULL) {
      if (probe->next->key == key) {
         Node* remove = probe->next;
         T* pReturn   = remove->pObject;
         probe->next  = remove->next;
         delete remove;
         return pReturn;
      }
      probe = probe->next;
   }

   // [tom, 8/19/2006] This assert is also utterly, utterly useless
   // AssertFatal(false, "Key didn't exist in the array!");
   return NULL;
}

Oh God there's more.
Share the horrifying with this link.