Skip to content

Commit 7b336cf

Browse files
author
Richard Unger
committed
fix const char warnings
1 parent 2b18cac commit 7b336cf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/communication/Commander.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ Commander::Commander(char eol, bool echo){
1111
}
1212

1313

14-
void Commander::add(char id, CommandCallback onCommand, char* label ){
14+
void Commander::add(char id, CommandCallback onCommand, const char* label ){
1515
call_list[call_count] = onCommand;
1616
call_ids[call_count] = id;
17-
call_label[call_count] = label;
17+
call_label[call_count] = (char*)label;
1818
call_count++;
1919
}
2020

src/communication/Commander.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Commander
9191
* @param onCommand - function pointer void function(char*)
9292
* @param label - string label to be displayed when scan command sent
9393
*/
94-
void add(char id , CommandCallback onCommand, char* label = nullptr);
94+
void add(char id , CommandCallback onCommand, const char* label = nullptr);
9595

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

0 commit comments

Comments
 (0)