Cleanup: Pass StringRef instead of const std::string &
No need to construct a std::string unless we're going to move from it.
This commit is contained in:
@@ -297,7 +297,7 @@ blender::ui::AbstractTreeView *UI_block_add_view(
|
||||
std::unique_ptr<blender::ui::AbstractTreeView> tree_view);
|
||||
|
||||
void UI_alert(bContext *C,
|
||||
const std::string &title,
|
||||
const std::string &message,
|
||||
blender::StringRef title,
|
||||
blender::StringRef message,
|
||||
eAlertIcon icon,
|
||||
bool compact);
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include "interface_intern.hh"
|
||||
#include "interface_regions_intern.hh"
|
||||
|
||||
using blender::StringRef;
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Utility Functions
|
||||
* \{ */
|
||||
@@ -1124,8 +1126,8 @@ static uiBlock *ui_alert_create(bContext *C, ARegion *region, void *user_data)
|
||||
}
|
||||
|
||||
void UI_alert(bContext *C,
|
||||
const std::string &title,
|
||||
const std::string &message,
|
||||
const StringRef title,
|
||||
const StringRef message,
|
||||
const eAlertIcon icon,
|
||||
const bool compact)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user