Cleanup: remove redundant checks & struct declaration

This commit is contained in:
Campbell Barton 2024-04-08 12:03:08 +10:00
parent 3c183e426a
commit 430d7961a2
4 changed files with 3 additions and 19 deletions

@ -186,7 +186,7 @@ const PointerRNA *CTX_store_ptr_lookup(const bContextStore *store,
{
for (auto entry = store->entries.rbegin(); entry != store->entries.rend(); ++entry) {
if (entry->name == name) {
if (!type || (type && RNA_struct_is_a(entry->ptr.type, type))) {
if (!type || RNA_struct_is_a(entry->ptr.type, type)) {
return &entry->ptr;
}
}

@ -1582,8 +1582,8 @@ float UI_text_clip_middle_ex(const uiFontStyle *fstyle,
* probably reduce this to one pixel if we consolidate text output with length measuring. But
* our text string lengths include the last character's right-side bearing anyway, so a string
* can be longer by that amount and still fit visibly in the required space. */
BLI_assert((strwidth <= (okwidth + 2)) || (okwidth <= 0.0f));
UNUSED_VARS_NDEBUG(okwidth);
return strwidth;
}

@ -115,7 +115,6 @@ static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode)
SpaceGraph *sipo = (SpaceGraph *)ac->sl;
Scene *scene = ac->scene;
ToolSettings *ts = scene->toolsettings;
eInsertKeyFlags flag = eInsertKeyFlags(0);
/* Filter data. */
filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_CURVE_VISIBLE | ANIMFILTER_FCURVESONLY |
@ -146,7 +145,7 @@ static void insert_graph_keys(bAnimContext *ac, eGraphKeys_InsertKey_Types mode)
}
/* Init key-framing flag. */
flag = ANIM_get_keyframing_flags(scene);
eInsertKeyFlags flag = ANIM_get_keyframing_flags(scene);
KeyframeSettings settings = get_keyframe_settings(true);
settings.keyframe_type = eBezTriple_KeyframeType(ts->keyframe_type);

@ -66,21 +66,6 @@
/* Own include. */
#include "sequencer_intern.hh"
/* -------------------------------------------------------------------- */
/** \name Structs & Enums
* \{ */
struct TransSeq {
int start, machine;
int startofs, endofs;
int anim_startofs, anim_endofs;
// int final_left, final_right; /* UNUSED. */
int len;
float content_start;
};
/** \} */
/* -------------------------------------------------------------------- */
/** \name Public Context Checks
* \{ */