compositor: do not duplicate ARRAY_SIZE
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
parent
85a46671db
commit
27a8c53020
|
@ -55,9 +55,6 @@
|
||||||
#include "../shared/os-compatibility.h"
|
#include "../shared/os-compatibility.h"
|
||||||
#include "git-version.h"
|
#include "git-version.h"
|
||||||
|
|
||||||
#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
|
|
||||||
|
|
||||||
|
|
||||||
static struct wl_list child_process_list;
|
static struct wl_list child_process_list;
|
||||||
static struct weston_compositor *segv_compositor;
|
static struct weston_compositor *segv_compositor;
|
||||||
|
|
||||||
|
@ -1246,7 +1243,7 @@ triangle_fan_debug(struct weston_surface *surface, int first, int count)
|
||||||
|
|
||||||
glUseProgram(compositor->solid_shader.program);
|
glUseProgram(compositor->solid_shader.program);
|
||||||
glUniform4fv(compositor->solid_shader.color_uniform, 1,
|
glUniform4fv(compositor->solid_shader.color_uniform, 1,
|
||||||
color[color_idx++ % ARRAY_SIZE(color)]);
|
color[color_idx++ % ARRAY_LENGTH(color)]);
|
||||||
glDrawElements(GL_LINES, nelems, GL_UNSIGNED_SHORT, buffer);
|
glDrawElements(GL_LINES, nelems, GL_UNSIGNED_SHORT, buffer);
|
||||||
glUseProgram(compositor->current_shader->program);
|
glUseProgram(compositor->current_shader->program);
|
||||||
free(buffer);
|
free(buffer);
|
||||||
|
|
Loading…
Reference in New Issue