MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / constrainParamSize

Function constrainParamSize

src/server/service/table_service.cpp:19–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18template <typename ParamT>
19bool constrainParamSize(const char *msg_template,
20 const char *name,
21 const ParamT &param,
22 const std::size_t target_size,
23 std::string &help)
24{
25 if (param.size() > 0 && param.size() != target_size)
26 {
27 help = osrm::util::compat::format(
28 osrm::util::compat::runtime_format(msg_template), name, param.size(), target_size);
29 return true;
30 }
31 return false;
32}
33
34std::string getWrongOptionHelp(const engine::api::TableParameters &parameters)
35{

Callers 5

getWrongOptionHelpFunction · 0.70
getWrongOptionHelpFunction · 0.70
getWrongOptionHelpFunction · 0.70
getWrongOptionHelpFunction · 0.70
getWrongOptionHelpFunction · 0.70

Calls 3

formatFunction · 0.85
runtime_formatFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected