Codechange: use std::optional<std::string> over char * for text query results
This commit is contained in:
+2
-2
@@ -972,9 +972,9 @@ public:
|
||||
_cursor.vehchain = false;
|
||||
}
|
||||
|
||||
void OnQueryTextFinished(char *str) override
|
||||
void OnQueryTextFinished(std::optional<std::string> str) override
|
||||
{
|
||||
if (str != nullptr) Command<CMD_ALTER_GROUP>::Post(STR_ERROR_GROUP_CAN_T_RENAME, AlterGroupMode::Rename, this->group_rename, 0, str);
|
||||
if (str.has_value()) Command<CMD_ALTER_GROUP>::Post(STR_ERROR_GROUP_CAN_T_RENAME, AlterGroupMode::Rename, this->group_rename, 0, *str);
|
||||
this->group_rename = INVALID_GROUP;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user