| 213 | } |
| 214 | |
| 215 | CommandError SimpleCLI::getError() { |
| 216 | if (!errorQueue) return CommandError(); |
| 217 | |
| 218 | // "Pop" cmd_error pointer from queue |
| 219 | cmd_error* ptr = errorQueue; |
| 220 | errorQueue = errorQueue->next; |
| 221 | |
| 222 | // Create wrapper class and copy cmd_error |
| 223 | CommandError e(ptr, COMMAND_ERROR_TEMPORARY); |
| 224 | |
| 225 | // Destroy old cmd_error from queue |
| 226 | cmd_error_destroy(ptr); |
| 227 | |
| 228 | return e; |
| 229 | } |
| 230 | |
| 231 | void SimpleCLI::addCmd(Command& c) { |
| 232 | if (!cmdList) { |
nothing calls this directly
no test coverage detected