Nuttx: remove use of std::string, std::map, std::set

Nuttx complains about an unresolved _impure_ptr at link time.
This is a known issue when using STL templates in NuttX on ARM.

Created new ORBMap and ORBSet classes for NuttX.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-06-09 18:56:28 -07:00
parent 13dd993e01
commit 4d28126e0a
12 changed files with 268 additions and 53 deletions
+5 -5
View File
@@ -43,7 +43,7 @@
#include "uORBCommunicator.hpp"
#include <stdlib.h>
std::map<std::string, uORB::DeviceNode*> uORB::DeviceMaster::_node_map;
uORB::ORBMap uORB::DeviceMaster::_node_map;
uORB::DeviceNode::DeviceNode
(
@@ -608,7 +608,7 @@ uORB::DeviceMaster::ioctl(struct file *filp, int cmd, unsigned long arg)
else
{
// add to the node map;.
_node_map[std::string(nodepath)] = node;
_node_map.insert(nodepath, node);
}
group_tries++;
@@ -631,12 +631,12 @@ uORB::DeviceMaster::ioctl(struct file *filp, int cmd, unsigned long arg)
}
}
uORB::DeviceNode* uORB::DeviceMaster::GetDeviceNode( const std::string& nodepath )
uORB::DeviceNode* uORB::DeviceMaster::GetDeviceNode( const char *nodepath )
{
uORB::DeviceNode* rc = nullptr;
if( _node_map.find( nodepath ) != _node_map.end() )
if( _node_map.find( nodepath ) )
{
rc = _node_map[nodepath];
rc = _node_map.get(nodepath);
}
return rc;
}