mirror of https://github.com/ARMmbed/mbed-os.git
Inline nsapi_create_stack(NetworkStack)
The rather fiddly `nsapi_create_stack` template + overloads used during socket formation don't inline their core, which is the identity operation for `NetworkStack *` itself. Make code generation easier by having that core be inline.pull/12467/head
parent
bac5ffec85
commit
f40c5616e1
|
@ -68,11 +68,6 @@ NetworkStack *nsapi_create_stack(nsapi_stack_t *stack)
|
|||
return reinterpret_cast<NetworkStack *>(stack);
|
||||
}
|
||||
|
||||
NetworkStack *nsapi_create_stack(NetworkStack *stack)
|
||||
{
|
||||
return reinterpret_cast<NetworkStack *>(stack);
|
||||
}
|
||||
|
||||
nsapi_value_or_error_t NetworkStack::gethostbyname_async(const char *host, hostbyname_cb_t callback, nsapi_version_t version,
|
||||
const char *interface_name)
|
||||
{
|
||||
|
|
|
@ -445,8 +445,3 @@ NetworkStack *nsapi_create_stack(nsapi_stack_t *stack)
|
|||
return new (stack->_stack_buffer) NetworkStackWrapper;
|
||||
}
|
||||
|
||||
NetworkStack *nsapi_create_stack(NetworkStack *stack)
|
||||
{
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
|
|
@ -483,14 +483,18 @@ private:
|
|||
|
||||
/** Convert a raw nsapi_stack_t object into a C++ NetworkStack object
|
||||
*
|
||||
* @param stack Reference to an object that can be converted to a stack
|
||||
* @param stack Pointer to an object that can be converted to a stack
|
||||
* - A raw nsapi_stack_t object
|
||||
* - A reference to a network stack
|
||||
* - A reference to a network interface
|
||||
* @return Reference to the underlying network stack
|
||||
* - A pointer to a network stack
|
||||
* - A pointer to a network interface
|
||||
* @return Pointer to the underlying network stack
|
||||
*/
|
||||
NetworkStack *nsapi_create_stack(nsapi_stack_t *stack);
|
||||
NetworkStack *nsapi_create_stack(NetworkStack *stack);
|
||||
|
||||
inline NetworkStack *nsapi_create_stack(NetworkStack *stack)
|
||||
{
|
||||
return stack;
|
||||
}
|
||||
|
||||
template <typename IF>
|
||||
NetworkStack *nsapi_create_stack(IF *iface)
|
||||
|
|
Loading…
Reference in New Issue