Skip to content

Commit

Permalink
fix const char warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Unger committed Nov 7, 2023
1 parent 2b18cac commit 7b336cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/communication/Commander.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Commander::Commander(char eol, bool echo){
}


void Commander::add(char id, CommandCallback onCommand, char* label ){
void Commander::add(char id, CommandCallback onCommand, const char* label ){
call_list[call_count] = onCommand;
call_ids[call_count] = id;
call_label[call_count] = label;
call_label[call_count] = (char*)label;
call_count++;
}

Expand Down
2 changes: 1 addition & 1 deletion src/communication/Commander.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Commander
* @param onCommand - function pointer void function(char*)
* @param label - string label to be displayed when scan command sent
*/
void add(char id , CommandCallback onCommand, char* label = nullptr);
void add(char id , CommandCallback onCommand, const char* label = nullptr);

// printing variables
VerboseMode verbose = VerboseMode::user_friendly; //!< flag signaling that the commands should output user understanable text
Expand Down

0 comments on commit 7b336cf

Please sign in to comment.