Cleanup: UI_alert, pass const references to strings
This commit is contained in:
@@ -296,4 +296,8 @@ blender::ui::AbstractTreeView *UI_block_add_view(
|
||||
blender::StringRef idname,
|
||||
std::unique_ptr<blender::ui::AbstractTreeView> tree_view);
|
||||
|
||||
void UI_alert(bContext *C, std::string title, std::string message, eAlertIcon icon, bool compact);
|
||||
void UI_alert(bContext *C,
|
||||
const std::string &title,
|
||||
const std::string &message,
|
||||
eAlertIcon icon,
|
||||
bool compact);
|
||||
|
||||
@@ -1123,7 +1123,11 @@ static uiBlock *ui_alert_create(bContext *C, ARegion *region, void *user_data)
|
||||
return block;
|
||||
}
|
||||
|
||||
void UI_alert(bContext *C, std::string title, std::string message, eAlertIcon icon, bool compact)
|
||||
void UI_alert(bContext *C,
|
||||
const std::string &title,
|
||||
const std::string &message,
|
||||
const eAlertIcon icon,
|
||||
const bool compact)
|
||||
{
|
||||
uiAlertData *data = MEM_new<uiAlertData>(__func__);
|
||||
data->title = title;
|
||||
|
||||
Reference in New Issue
Block a user