Commit 14f5cd31 authored by Chun Fan's avatar Chun Fan
Browse files

Revert unnecessary changes

parent 9f1a0143
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include <string> #include <string>
AdapterInternal::AdapterInternal(SerializationTransport *_transport): AdapterInternal::AdapterInternal(SerializationTransport *_transport):
eventCallback(nullptr), eventCallback(nullptr),
statusCallback(nullptr), statusCallback(nullptr),
logCallback(nullptr), logCallback(nullptr),
...@@ -51,7 +51,7 @@ AdapterInternal::AdapterInternal(SerializationTransport *_transport): ...@@ -51,7 +51,7 @@ AdapterInternal::AdapterInternal(SerializationTransport *_transport):
{ {
this->transport = _transport; this->transport = _transport;
} }
AdapterInternal::~AdapterInternal() AdapterInternal::~AdapterInternal()
{ {
delete transport; delete transport;
......
...@@ -65,12 +65,12 @@ uint32_t sd_rpc_serial_port_enum(sd_rpc_serial_port_desc_t serial_port_descs[], ...@@ -65,12 +65,12 @@ uint32_t sd_rpc_serial_port_enum(sd_rpc_serial_port_desc_t serial_port_descs[],
if(ret != NRF_SUCCESS) if(ret != NRF_SUCCESS)
{ {
return ret; return ret;
} }
if(descs.size() > *size) if(descs.size() > *size)
{ {
ret = NRF_ERROR_DATA_SIZE; ret = NRF_ERROR_DATA_SIZE;
} }
*size = (uint32_t) descs.size(); *size = (uint32_t) descs.size();
...@@ -78,7 +78,7 @@ uint32_t sd_rpc_serial_port_enum(sd_rpc_serial_port_desc_t serial_port_descs[], ...@@ -78,7 +78,7 @@ uint32_t sd_rpc_serial_port_enum(sd_rpc_serial_port_desc_t serial_port_descs[],
if(ret == NRF_SUCCESS) if(ret == NRF_SUCCESS)
{ {
int i = 0; int i = 0;
for(auto it = descs.begin(); it != descs.end(); ++it) for(auto it = descs.begin(); it != descs.end(); ++it)
{ {
strcpy_s(serial_port_descs[i].port, SD_RPC_MAXPATHLEN, (*it)->comName.c_str()); strcpy_s(serial_port_descs[i].port, SD_RPC_MAXPATHLEN, (*it)->comName.c_str());
strcpy_s(serial_port_descs[i].manufacturer, SD_RPC_MAXPATHLEN, (*it)->manufacturer.c_str()); strcpy_s(serial_port_descs[i].manufacturer, SD_RPC_MAXPATHLEN, (*it)->manufacturer.c_str());
...@@ -91,8 +91,8 @@ uint32_t sd_rpc_serial_port_enum(sd_rpc_serial_port_desc_t serial_port_descs[], ...@@ -91,8 +91,8 @@ uint32_t sd_rpc_serial_port_enum(sd_rpc_serial_port_desc_t serial_port_descs[],
++i; ++i;
} }
} }
for(auto it = descs.begin(); it != descs.end(); ++it) for(auto it = descs.begin(); it != descs.end(); ++it)
{ {
delete *it; delete *it;
} }
......
...@@ -66,8 +66,7 @@ extern "C" { ...@@ -66,8 +66,7 @@ extern "C" {
* @retval NRF_SUCCESS Encoding success. * @retval NRF_SUCCESS Encoding success.
* @retval NRF_ERROR_INTERNAL Encoding failure. Transport error. * @retval NRF_ERROR_INTERNAL Encoding failure. Transport error.
*/ */
// uint32_t conn_systemreset_enc(uint8_t * const p_buf, // uint32_t conn_systemreset(void);
// uint32_t * const p_buf_len);
/** @} */ /** @} */
#ifdef __cplusplus #ifdef __cplusplus
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment