Moved assignment from within a loop
This commit is contained in:
parent
79cf3d2b3a
commit
9d5a32c536
1 changed files with 1 additions and 2 deletions
|
|
@ -124,9 +124,8 @@ static char *my_rl_complete(char *token, int *match)
|
||||||
const char* method_name;
|
const char* method_name;
|
||||||
|
|
||||||
auto& cmd = cli_commands();
|
auto& cmd = cli_commands();
|
||||||
|
int partlen = strlen (token); /* Part of token */
|
||||||
for (auto it : cmd) {
|
for (auto it : cmd) {
|
||||||
int partlen = strlen (token); /* Part of token */
|
|
||||||
|
|
||||||
if (!strncmp (it.c_str(), token, partlen)) {
|
if (!strncmp (it.c_str(), token, partlen)) {
|
||||||
method_name = it.c_str();
|
method_name = it.c_str();
|
||||||
matchlen = partlen;
|
matchlen = partlen;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue