Sam Grove / CommHandler

Dependents:   Waldo_Embed_V2

Files at this revision

API Documentation at this revision

Comitter:
sam_grove
Date:
Wed May 22 19:37:22 2013 +0000
Parent:
8:83b252ec0afd
Commit message:
Removed an un-necessary cast. Important to note that this currently should be used in global scope. Objects that are added to the underlying linked list do not have a mechanism to be deleted. Therefore a memory leak would occur if used in local scope

Changed in this revision

CommHandler.cpp Show annotated file Show diff for this revision Revisions of this file
CommHandler.h Show annotated file Show diff for this revision Revisions of this file
--- a/CommHandler.cpp	Tue May 14 23:04:09 2013 +0000
+++ b/CommHandler.cpp	Wed May 22 19:37:22 2013 +0000
@@ -40,7 +40,7 @@
     new_node->string = string;
     new_node->handler.attach( function );
     // and insert them into the list
-    _list.append( (MsgObj *)new_node);
+    _list.append(new_node);
 
     return;
 }
--- a/CommHandler.h	Tue May 14 23:04:09 2013 +0000
+++ b/CommHandler.h	Wed May 22 19:37:22 2013 +0000
@@ -71,15 +71,15 @@
  *      msgs.attachMsg("Three", &three);
  *      
  *      tmp = msgs.messageLookup(0);
- *      printf("1:%s\n", tmp);
+ *      printf("0:%s\n", tmp);
  *      tmp = msgs.messageLookup(1);
+ *      printf("1:%s\n", tmp);
+ *      tmp = msgs.messageLookup(2);
  *      printf("2:%s\n", tmp);
- *      tmp = msgs.messageLookup(2);
+ *      tmp = msgs.messageLookup(3);
  *      printf("3:%s\n", tmp);
- *      tmp = msgs.messageLookup(3);
+ *      tmp = msgs.messageLookup(4);
  *      printf("4:%s\n", tmp);
- *      tmp = msgs.messageLookup(4);
- *      printf("5:%s\n", tmp);
  *          
  *      tmp = msgs.serviceMessage("Two-00-66-99-20133");
  *      printf("1: Found: %s\n", tmp);