MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / GetElementOr

Function GetElementOr

rtpose_wrapper/src/gtest/gtest-all.cpp:690–692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688// in range [0, v.size()).
689template <typename E>
690inline E GetElementOr(const std::vector<E>& v, int i, E default_value) {
691 return (i < 0 || i >= static_cast<int>(v.size())) ? default_value : v[i];
692}
693
694// Performs an in-place shuffle of a range of the vector's elements.
695// 'begin' and 'end' are element indices as an STL-style range;

Callers 4

GetTestCaseFunction · 0.85
GetMutableTestCaseFunction · 0.85
GetTestInfoMethod · 0.85
GetMutableTestInfoMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected