Fix (unreported) three wrong next/prev pointers order in ListBase link structs.

There was even one case in BLI ListBase tests!

Order was opposite of the one expected by the BLI ListBase code... Not
sure how, but this did not cause any issue apparently? But would expect
it to at least affect the order in which items in the list would be
iterated.
This commit is contained in:
Bastien Montagne
2023-05-12 18:53:24 +02:00
parent ddd6e05c8d
commit 3b647faec8
3 changed files with 4 additions and 4 deletions

View File

@@ -787,7 +787,7 @@ void BKE_layer_collection_resync_allow(void)
}
struct LayerCollectionResync {
LayerCollectionResync *prev, *next;
LayerCollectionResync *next, *prev;
/* Temp data used to generate a queue during valid layer search. See
* #layer_collection_resync_find. */
@@ -1006,7 +1006,7 @@ void BKE_main_view_layers_synced_ensure(const Main *bmain)
BKE_scene_view_layers_synced_ensure(scene);
}
/* NOTE: This is not (yet?) covered by the dirty tag and differed re-sync system */
/* NOTE: This is not (yet?) covered by the dirty tag and deffered re-sync system. */
BKE_layer_collection_local_sync_all(bmain);
}

View File

@@ -107,7 +107,7 @@ TEST(listbase, FindLinkOrIndex)
TEST(listbase, FindLinkFromStringOrPointer)
{
struct TestLink {
struct TestLink *prev, *next;
struct TestLink *next, *prev;
char name[64];
const void *ptr;
};

View File

@@ -982,7 +982,7 @@ typedef struct tGaussOperatorData {
/* Store data to smooth an FCurve segment. */
typedef struct tFCurveSegmentLink {
struct tFCurveSegmentLink *prev, *next;
struct tFCurveSegmentLink *next, *prev;
FCurve *fcu;
FCurveSegment *segment;
float *samples; /* Array of y-values of the FCurve segment. */