MCPcopy Create free account
hub / github.com/apache/incubator-pegasus / try_get

Method try_get

src/runtime/task/task_code.cpp:79–85  ·  view source on GitHub ↗

static*/

Source from the content-addressed store, hash-verified

77
78/*static*/
79task_code task_code::try_get(const char *name, task_code default_value)
80{
81 int code = task_code_mgr::instance().get_id(name);
82 if (code == -1)
83 return default_value;
84 return task_code(code);
85}
86
87/*static*/
88task_code task_code::try_get(const std::string &name, task_code default_value)

Callers

nothing calls this directly

Calls 2

get_idMethod · 0.80
task_codeClass · 0.70

Tested by

no test coverage detected