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