Minor cleanup.

* Use pie direction, not draw type for pie item collision
* Strict function definitions.
* Initialize random array with system time
This commit is contained in:
2014-10-09 17:12:32 +02:00
parent 928be3013a
commit 5f6e47e767
3 changed files with 4 additions and 4 deletions

View File

@@ -255,7 +255,7 @@ RNG_THREAD_ARRAY *BLI_rng_threaded_new(void)
RNG_THREAD_ARRAY *rngarr = MEM_mallocN(sizeof(RNG_THREAD_ARRAY), "random_array");
for (i = 0; i < BLENDER_MAX_THREADS; i++) {
BLI_rng_srandom(&rngarr->rng_tab[i], (unsigned int)(rngarr->rng_tab[i].X * 257));
BLI_rng_srandom(&rngarr->rng_tab[i], (unsigned int)clock());
}
return rngarr;

View File

@@ -6560,7 +6560,7 @@ static bool ui_mouse_inside_button(ARegion *ar, uiBut *but, int x, int y)
ui_window_to_block_fl(ar, block, &mx, &my);
if (but->dt == UI_EMBOSSR) {
if (but->pie_dir != UI_RADIAL_NONE) {
if (!ui_but_isect_pie_seg(block, but)) {
return false;
}

View File

@@ -88,12 +88,12 @@ extern struct Render R;
static RNG_THREAD_ARRAY *random_tex_array;
void RE_init_texture_rng()
void RE_init_texture_rng(void)
{
random_tex_array = BLI_rng_threaded_new();
}
void RE_exit_texture_rng()
void RE_exit_texture_rng(void)
{
BLI_rng_threaded_free(random_tex_array);
}