Skip to content

Commit

Permalink
fix clang-tidy error
Browse files Browse the repository at this point in the history
  • Loading branch information
Aki-7 committed Jul 15, 2023
1 parent 1091611 commit 7d7a34e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions zen/include/zen/xr-system.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ zn_xr_system_connect(struct zn_xr_system *self)
UNUSED static inline bool
zn_xr_system_is_connected(struct zn_xr_system *self)
{
uint32_t connected = ZN_XR_SYSTEM_SESSION_STATE_SYNCHRONIZED |
ZN_XR_SYSTEM_SESSION_STATE_VISIBLE |
ZN_XR_SYSTEM_SESSION_STATE_FOCUS;
const uint32_t connected = ZN_XR_SYSTEM_SESSION_STATE_SYNCHRONIZED |
ZN_XR_SYSTEM_SESSION_STATE_VISIBLE |
ZN_XR_SYSTEM_SESSION_STATE_FOCUS;
return (self->state & connected) != 0;
}

Expand Down
2 changes: 1 addition & 1 deletion zen/src/backend/immersive/remote/gl-buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ GlBuffer::HandleData(struct zn_gl_buffer *c_obj, uint32_t target,
{
auto *self = static_cast<GlBuffer *>(c_obj->impl_data);

ssize_t size = zn_buffer_get_size(buffer);
const ssize_t size = zn_buffer_get_size(buffer);

auto loop = std::make_unique<Loop>(wl_display_get_event_loop(self->display_));

Expand Down
2 changes: 1 addition & 1 deletion zen/src/backend/immersive/remote/xr-dispatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ XrDispatcher::HandleGetNewGlShader(
std::string source;

{
ssize_t length = zn_buffer_get_size(buffer);
const ssize_t length = zn_buffer_get_size(buffer);
auto *data = zn_buffer_begin_access(buffer);
source = std::string(static_cast<char *>(data), length);
zn_buffer_end_access(buffer);
Expand Down
6 changes: 3 additions & 3 deletions zen/src/backend/immersive/remote/xr-system.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ XrSystem::is_alive() const
inline bool
XrSystem::is_connected() const
{
uint32_t connected = ZN_XR_SYSTEM_SESSION_STATE_SYNCHRONIZED |
ZN_XR_SYSTEM_SESSION_STATE_VISIBLE |
ZN_XR_SYSTEM_SESSION_STATE_FOCUS;
const uint32_t connected = ZN_XR_SYSTEM_SESSION_STATE_SYNCHRONIZED |
ZN_XR_SYSTEM_SESSION_STATE_VISIBLE |
ZN_XR_SYSTEM_SESSION_STATE_FOCUS;

return (c_obj_.state & connected) != 0;
}
Expand Down
18 changes: 9 additions & 9 deletions zen/src/binding.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

#define CONFIG_SECTION_KEY "binding"

#define TOKEN_SHIFT "shift"
#define TOKEN_CTRL "ctrl"
#define TOKEN_ALT "alt"
#define TOKEN_LOGO "logo"
#define TOKEN_RIGHT "right"
#define TOKEN_LEFT "left"
#define TOKEN_UP "up"
#define TOKEN_DOWN "down"
#define TOKEN_SEPARATOR '+'
const char *const TOKEN_SHIFT = "shift";
const char *const TOKEN_CTRL = "ctrl";
const char *const TOKEN_ALT = "alt";
const char *const TOKEN_LOGO = "logo";
const char *const TOKEN_RIGHT = "right";
const char *const TOKEN_LEFT = "left";
const char *const TOKEN_UP = "up";
const char *const TOKEN_DOWN = "down";
const char TOKEN_SEPARATOR = '+';

static const uint32_t ascii_to_keycode[] = {
['a'] = KEY_A,
Expand Down

0 comments on commit 7d7a34e

Please sign in to comment.