MCPcopy Create free account
hub / github.com/AutonomousFieldRoboticsLab/SVIn / isTopicInMap

Function isTopicInMap

okvis_ros/src/dataset_convertor.cpp:301–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301bool isTopicInMap(map<string, map<string, string>>& topic2info, string topic_name) { // NOLINT
302 bool res = false;
303 if (topic2info.find(topic_name) != topic2info.end()) {
304 res = true;
305 } else {
306 size_t first_slash = topic_name.find_first_of("/");
307 if (first_slash == 0) {
308 if (topic2info.find(topic_name.substr(1)) != topic2info.end()) {
309 res = true;
310 }
311 } else {
312 if (topic2info.find("/" + topic_name) != topic2info.end()) {
313 res = true;
314 }
315 }
316 }
317 return res;
318}
319
320bool findTopicInMap(map<string, map<string, string>>& topic2info, // NOLINT
321 string topic_name,

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected