MCPcopy Create free account
hub / github.com/apache/brpc / get_string

Method get_string

src/butil/find_cstr.h:59–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 }
58
59 inline std::string* get_string(const char* key) {
60 if (!initialized) {
61 initialized = true;
62 std::string* tmp = new (buf) std::string(key);
63 thread_atexit(delete_tls, this);
64 return tmp;
65 } else {
66 std::string* tmp = (std::string*)buf;
67 tmp->assign(key);
68 return tmp;
69 }
70 }
71
72 inline std::string* get_string(const char* key, size_t length) {
73 if (!initialized) {

Callers 1

find_cstrFunction · 0.80

Calls 2

thread_atexitFunction · 0.85
assignMethod · 0.45

Tested by

no test coverage detected