diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2022-10-21 14:47:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-21 20:47:44 +0800 |
commit | 784e498c4a9c1f03266ced5ec3f55c3a6c94b80d (patch) | |
tree | 55f79bf7e309d522a76f6efe0cb3ed631340f431 /src/nvim/os/time.c | |
parent | e554f5c545b9ee1195d617b3ac21f24829330a31 (diff) | |
download | rneovim-784e498c4a9c1f03266ced5ec3f55c3a6c94b80d.tar.gz rneovim-784e498c4a9c1f03266ced5ec3f55c3a6c94b80d.tar.bz2 rneovim-784e498c4a9c1f03266ced5ec3f55c3a6c94b80d.zip |
refactor: clang-tidy fixes to silence clangd warning (#20683)
* refactor: readability-uppercase-literal-suffix
* refactor: readability-named-parameter
* refactor: bugprone-suspicious-string-compare
* refactor: google-readability-casting
* refactor: readability-redundant-control-flow
* refactor: bugprone-too-small-loop-variable
* refactor: readability-non-const-parameter
* refactor: readability-avoid-const-params-in-decls
* refactor: google-readability-todo
* refactor: readability-inconsistent-declaration-parameter-name
* refactor: bugprone-suspicious-missing-comma
* refactor: remove noisy or slow warnings
Diffstat (limited to 'src/nvim/os/time.c')
-rw-r--r-- | src/nvim/os/time.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/os/time.c b/src/nvim/os/time.c index 396bf6986a..161c8d28b8 100644 --- a/src/nvim/os/time.c +++ b/src/nvim/os/time.c @@ -67,7 +67,7 @@ void os_delay(uint64_t ms, bool ignoreinput) } LOOP_PROCESS_EVENTS_UNTIL(&main_loop, NULL, (int)ms, got_int); } else { - os_microdelay(ms * 1000u, ignoreinput); + os_microdelay(ms * 1000U, ignoreinput); } } @@ -80,10 +80,10 @@ void os_delay(uint64_t ms, bool ignoreinput) /// If false, waiting is aborted on any input. void os_microdelay(uint64_t us, bool ignoreinput) { - uint64_t elapsed = 0u; + uint64_t elapsed = 0U; uint64_t base = uv_hrtime(); // Convert microseconds to nanoseconds, or UINT64_MAX on overflow. - const uint64_t ns = (us < UINT64_MAX / 1000u) ? us * 1000u : UINT64_MAX; + const uint64_t ns = (us < UINT64_MAX / 1000U) ? us * 1000U : UINT64_MAX; uv_mutex_lock(&delay_mutex); @@ -92,7 +92,7 @@ void os_microdelay(uint64_t us, bool ignoreinput) // Else we check for input in ~100ms intervals. const uint64_t ns_delta = ignoreinput ? ns - elapsed - : MIN(ns - elapsed, 100000000u); // 100ms + : MIN(ns - elapsed, 100000000U); // 100ms const int rv = uv_cond_timedwait(&delay_cond, &delay_mutex, ns_delta); if (0 != rv && UV_ETIMEDOUT != rv) { |