MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / append

Method append

libraries/AP_Common/ExpandingString.cpp:102–115  ·  view source on GitHub ↗

print into the buffer, expanding if needed */

Source from the content-addressed store, hash-verified

100 print into the buffer, expanding if needed
101 */
102bool ExpandingString::append(const char *s, uint32_t len)
103{
104 if (allocation_failed) {
105 return false;
106 }
107 if (buflen - used < len && !expand(len)) {
108 return false;
109 }
110 if (s != nullptr) {
111 memcpy(&buf[used], s, len);
112 }
113 used += len;
114 return true;
115}
116
117ExpandingString::~ExpandingString()
118{

Callers 3

TESTFunction · 0.45
TESTFunction · 0.45
log_retrieveMethod · 0.45

Calls 1

memcpyFunction · 0.85

Tested by 2

TESTFunction · 0.36
TESTFunction · 0.36