MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / push_back

Method push_back

plugins/multiserver/DevicesWithParameters.cpp:54–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 public:
53 typedef std::unique_ptr<char[]> UniqueCharArray;
54 void push_back(std::string const &str) {
55 // Remove null terminator from array
56 if (m_arrayHasNullTerminator()) {
57 m_data.pop_back();
58 }
59 {
60 const size_t stringLength = str.size() + 1;
61 UniqueCharArray copy(new char[stringLength]);
62 memcpy(copy.get(), str.c_str(), stringLength);
63 m_dataOwnership.push_back(std::move(copy));
64 }
65 m_data.push_back(m_dataOwnership.back().get());
66 }
67 const char **get_array() {
68 // Ensure null terminator on array
69 if (!m_arrayHasNullTerminator()) {

Callers 15

remove_levels_ifFunction · 0.45
m_outputLineWithIdMethod · 0.45
loadPluginsMethod · 0.45
instantiateDriversMethod · 0.45
getInterfaceMethod · 0.45
registerEyeHandlerMethod · 0.45
registerPingHandlerMethod · 0.45
registerPongHandlerMethod · 0.45
JSONTransformVisitorMethod · 0.45

Calls 3

backMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45

Tested by 1

MainMethod · 0.36