mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-20 14:22:00 +00:00
[client] clean up manual versions of ARRAY_LENGTH macro
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#include "app.h"
|
||||
#include "common/array.h"
|
||||
#include "common/debug.h"
|
||||
|
||||
struct X11ClipboardState
|
||||
@@ -176,14 +177,15 @@ static void x11CBSelectionRequest(const XSelectionRequestEvent e)
|
||||
targets[1] = x11cb.aTypes[x11cb.type];
|
||||
|
||||
XChangeProperty(
|
||||
e.display,
|
||||
e.requestor,
|
||||
e.property,
|
||||
XA_ATOM,
|
||||
32,
|
||||
PropModeReplace,
|
||||
(unsigned char*)targets,
|
||||
sizeof(targets) / sizeof(Atom));
|
||||
e.display,
|
||||
e.requestor,
|
||||
e.property,
|
||||
XA_ATOM,
|
||||
32,
|
||||
PropModeReplace,
|
||||
(unsigned char*)targets,
|
||||
ARRAY_LENGTH(targets)
|
||||
);
|
||||
|
||||
goto send;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "interface/renderer.h"
|
||||
|
||||
#include "common/util.h"
|
||||
#include "common/array.h"
|
||||
#include "common/debug.h"
|
||||
#include "common/KVMFR.h"
|
||||
#include "common/option.h"
|
||||
@@ -892,7 +893,7 @@ static bool egl_renderStartup(LG_Renderer * renderer, bool useDMA)
|
||||
const char * configDesc = NULL;
|
||||
int chosen = -1;
|
||||
|
||||
for (int i = 0; i < (int)(sizeof(configs) / sizeof(configs[0])); ++i)
|
||||
for (int i = 0; i < (int)ARRAY_LENGTH(configs); ++i)
|
||||
{
|
||||
if (configs[i].componentType == EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT &&
|
||||
!hasFloatConfigs)
|
||||
|
||||
Reference in New Issue
Block a user