Added const in AT_CellularNetwork::set_registration

pull/6082/head
Ari Parkkila 2018-02-19 10:44:15 +02:00
parent cd486f2624
commit bc67100dcf
4 changed files with 5 additions and 5 deletions

View File

@ -95,7 +95,7 @@ nsapi_error_t AT_CellularNetwork::set_registration_urc(bool urc_on)
return NSAPI_ERROR_OK;
}
nsapi_error_t AT_CellularNetwork::set_registration(char *plmn)
nsapi_error_t AT_CellularNetwork::set_registration(const char *plmn)
{
return NSAPI_ERROR_OK;
}

View File

@ -206,7 +206,7 @@ public:
* @param plmn format is in numeric format or 0 for automatic network registration
* @return zero on success
*/
virtual nsapi_error_t set_registration(char *plmn = 0) = 0;
virtual nsapi_error_t set_registration(const char *plmn = 0) = 0;
/** Gets the network registration status.
*

View File

@ -420,7 +420,7 @@ nsapi_ip_stack_t AT_CellularNetwork::string_to_stack_type(const char* pdp_type)
nsapi_error_t AT_CellularNetwork::set_registration_urc(bool urc_on)
{
for (int i = 0; i < sizeof(at_reg)/sizeof(at_reg[0]); i++) {
for (unsigned int i = 0; i < sizeof(at_reg)/sizeof(at_reg[0]); i++) {
if (has_registration(at_reg[i].type)) {
_last_reg_type = at_reg[i].type;
if (urc_on) {
@ -440,7 +440,7 @@ nsapi_error_t AT_CellularNetwork::set_registration_urc(bool urc_on)
return _at.get_last_error();
}
nsapi_error_t AT_CellularNetwork::set_registration(char *plmn)
nsapi_error_t AT_CellularNetwork::set_registration(const char *plmn)
{
_at.lock();

View File

@ -91,7 +91,7 @@ public: // CellularNetwork
* @param plmn format is in numeric format or 0 for automatic network registration
* @return zero on success
*/
virtual nsapi_error_t set_registration(char *plmn = 0);
virtual nsapi_error_t set_registration(const char *plmn = 0);
/**
* Gets the network registration status.