added a helpful assert to the queue code
Now, instead of failing later when it tries to use it, it fails
immediately when it fails to get a new message to send.
git-svn-id: https://robotics.mvla.net/svn/frc971/2013/trunk/src@4159 f308d9b7-e957-4cde-b6ac-9a88185e7312
diff --git a/aos/atom_code/queue-tmpl.h b/aos/atom_code/queue-tmpl.h
index 2c6e4e4..3a8eea8 100644
--- a/aos/atom_code/queue-tmpl.h
+++ b/aos/atom_code/queue-tmpl.h
@@ -234,7 +234,9 @@
template <class T>
T *Queue<T>::MakeRawMessage() {
- return static_cast<T *>(aos_queue_get_msg(queue_));
+ T *ret = static_cast<T *>(aos_queue_get_msg(queue_));
+ assert(ret != NULL);
+ return ret;
}
template <class T>