| 168 | } |
| 169 | |
| 170 | Command SimpleCLI::getCmd() { |
| 171 | if (!cmdQueue) return Command(); |
| 172 | |
| 173 | // "Pop" cmd pointer from queue |
| 174 | cmd* ptr = cmdQueue; |
| 175 | |
| 176 | cmdQueue = cmdQueue->next; |
| 177 | |
| 178 | // Create wrapper class and copy cmd |
| 179 | Command c(ptr, COMMAND_TEMPORARY); |
| 180 | |
| 181 | // Destroy old cmd from queue |
| 182 | cmd_destroy(ptr); |
| 183 | |
| 184 | return c; |
| 185 | } |
| 186 | |
| 187 | Command SimpleCLI::getCmd(String name) { |
| 188 | return getCmd(name.c_str()); |
nothing calls this directly
no test coverage detected