MCPcopy Create free account
hub / github.com/commontk/CTK / getLastElement

Function getLastElement

Utilities/DGraph/DGraph.cpp:94–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92}
93
94int getLastElement(const std::list<int>& list)
95{
96 int result = -1;
97
98 if (list.size() > 0)
99 {
100 std::list<int>::const_reverse_iterator iterator;
101 iterator = list.rend();
102 result = *iterator;
103 }
104
105 return result;
106}
107
108//----------------------------------------------------------------------------
109int getOrGenerateId(std::map<int, std::string>& vertexIdToLabel,

Callers 1

mainFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected