mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
aux/util: clang-tidy
This commit is contained in:
parent
876bd5088f
commit
86d3d2b149
|
@ -55,9 +55,8 @@ u_hashmap_int_find(struct u_hashmap_int *hmi, uint64_t key, void **out_item)
|
||||||
if (search != hmi->map.end()) {
|
if (search != hmi->map.end()) {
|
||||||
*out_item = search->second;
|
*out_item = search->second;
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
|
|
|
@ -30,16 +30,16 @@ int
|
||||||
u_hashmap_int_create(struct u_hashmap_int **out_hashmap);
|
u_hashmap_int_create(struct u_hashmap_int **out_hashmap);
|
||||||
|
|
||||||
int
|
int
|
||||||
u_hashmap_int_destroy(struct u_hashmap_int **hs);
|
u_hashmap_int_destroy(struct u_hashmap_int **hmi);
|
||||||
|
|
||||||
int
|
int
|
||||||
u_hashmap_int_find(struct u_hashmap_int *hs, uint64_t key, void **out_item);
|
u_hashmap_int_find(struct u_hashmap_int *hmi, uint64_t key, void **out_item);
|
||||||
|
|
||||||
int
|
int
|
||||||
u_hashmap_int_insert(struct u_hashmap_int *hs, uint64_t key, void *value);
|
u_hashmap_int_insert(struct u_hashmap_int *hmi, uint64_t key, void *value);
|
||||||
|
|
||||||
int
|
int
|
||||||
u_hashmap_int_erase(struct u_hashmap_int *hs, uint64_t key);
|
u_hashmap_int_erase(struct u_hashmap_int *hmi, uint64_t key);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* First clear the hashmap and then call the given callback with each item that
|
* First clear the hashmap and then call the given callback with each item that
|
||||||
|
@ -48,7 +48,7 @@ u_hashmap_int_erase(struct u_hashmap_int *hs, uint64_t key);
|
||||||
* @ingroup aux_util
|
* @ingroup aux_util
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
u_hashmap_int_clear_and_call_for_each(struct u_hashmap_int *hs,
|
u_hashmap_int_clear_and_call_for_each(struct u_hashmap_int *hmi,
|
||||||
u_hashmap_int_callback cb,
|
u_hashmap_int_callback cb,
|
||||||
void *priv);
|
void *priv);
|
||||||
|
|
||||||
|
|
|
@ -60,9 +60,8 @@ u_hashset_find_str(struct u_hashset *hs,
|
||||||
if (search != hs->map.end()) {
|
if (search != hs->map.end()) {
|
||||||
*out_item = search->second;
|
*out_item = search->second;
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int
|
extern "C" int
|
||||||
|
|
|
@ -52,11 +52,11 @@ clamp_to_byte(int v)
|
||||||
{
|
{
|
||||||
if (v < 0) {
|
if (v < 0) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (v >= 255) {
|
|
||||||
return 255;
|
|
||||||
} else {
|
|
||||||
return v;
|
|
||||||
}
|
}
|
||||||
|
if (v >= 255) {
|
||||||
|
return 255;
|
||||||
|
}
|
||||||
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint32_t
|
static inline uint32_t
|
||||||
|
@ -73,7 +73,7 @@ YUV444_to_RGBX8888(int y, int u, int v)
|
||||||
return B << 16 | G << 8 | R;
|
return B << 16 | G << 8 | R;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t lookup_YUV_to_RGBX[256][256][256] = {0};
|
static uint32_t lookup_YUV_to_RGBX[256][256][256] = {{0}};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
generate_lookup_YUV_to_RGBX()
|
generate_lookup_YUV_to_RGBX()
|
||||||
|
|
Loading…
Reference in a new issue