Cleanup: use const args, variable
This commit is contained in:
@@ -1197,7 +1197,7 @@ static std::unique_ptr<uiTooltipData> ui_tooltip_data_from_gizmo(bContext *C, wm
|
||||
}
|
||||
|
||||
/* Property Actions */
|
||||
for (wmGizmoProperty &gz_prop : gz->target_properties) {
|
||||
for (const wmGizmoProperty &gz_prop : gz->target_properties) {
|
||||
if (gz_prop.prop != nullptr) {
|
||||
const char *info = RNA_property_ui_description(gz_prop.prop);
|
||||
if (info && info[0]) {
|
||||
|
||||
@@ -243,7 +243,7 @@ void WM_gizmo_target_property_def_func(wmGizmo *gz,
|
||||
void WM_gizmo_target_property_clear_rna_ptr(wmGizmo *gz, const wmGizmoPropertyType *gz_prop_type);
|
||||
void WM_gizmo_target_property_clear_rna(wmGizmo *gz, const char *idname);
|
||||
|
||||
bool WM_gizmo_target_property_is_valid_any(wmGizmo *gz);
|
||||
bool WM_gizmo_target_property_is_valid_any(const wmGizmo *gz);
|
||||
bool WM_gizmo_target_property_is_valid(const wmGizmoProperty *gz_prop);
|
||||
float WM_gizmo_target_property_float_get(const wmGizmo *gz, wmGizmoProperty *gz_prop);
|
||||
void WM_gizmo_target_property_float_set(bContext *C,
|
||||
|
||||
@@ -123,9 +123,9 @@ void WM_gizmo_target_property_clear_rna(wmGizmo *gz, const char *idname)
|
||||
/** \name Property Access
|
||||
* \{ */
|
||||
|
||||
bool WM_gizmo_target_property_is_valid_any(wmGizmo *gz)
|
||||
bool WM_gizmo_target_property_is_valid_any(const wmGizmo *gz)
|
||||
{
|
||||
for (wmGizmoProperty &gz_prop : gz->target_properties) {
|
||||
for (const wmGizmoProperty &gz_prop : gz->target_properties) {
|
||||
if (WM_gizmo_target_property_is_valid(&gz_prop)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user