Skip to content

Commit 7536d60

Browse files
committed
Fix clang format
1 parent c798f6e commit 7536d60

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/frontend/ibusfrontend/ibusfrontend.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,9 +597,7 @@ class IBusInputContext : public InputContext,
597597
}
598598
FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY(
599599
contentType, "ContentType", "(uu)",
600-
([]() -> dbus::DBusStruct<uint32_t, uint32_t> {
601-
return {0, 0};
602-
}),
600+
([]() -> dbus::DBusStruct<uint32_t, uint32_t> { return {0, 0}; }),
603601
([this](dbus::DBusStruct<uint32_t, uint32_t> type) {
604602
setContentType(std::get<0>(type), std::get<1>(type));
605603
}),

src/lib/fcitx-utils/event_common.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@
99
#include <cstring>
1010
#include "event.h"
1111

12-
#define USEC_INFINITY ((uint64_t)-1)
13-
#define USEC_PER_SEC ((uint64_t)1000000ULL)
14-
#define NSEC_PER_USEC ((uint64_t)1000ULL)
15-
1612
namespace fcitx {
1713

14+
namespace {
15+
16+
constexpr uint64_t USEC_INFINITY = static_cast<uint64_t>(-1);
17+
constexpr uint64_t USEC_PER_SEC = 1000000ULL;
18+
constexpr uint64_t NSEC_PER_USEC = 1000ULL;
19+
20+
} // namespace
21+
1822
// From systemd :)
1923
uint64_t timespec_load(const struct timespec *ts) {
2024
if (ts->tv_sec == (time_t)-1 && ts->tv_nsec == (long)-1) {

src/ui/classic/xcbui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ void XCBUI::readXSettings() {
625625
if (!readCard16(&nameLen)) {
626626
return;
627627
}
628-
#define XSETTINGS_PAD(n, m) (((n) + (m)-1) & (~((m)-1)))
628+
#define XSETTINGS_PAD(n, m) (((n) + (m) - 1) & (~((m) - 1)))
629629
uint32_t namePad = XSETTINGS_PAD(nameLen, 4);
630630
if (std::distance(iter, data.cend()) < namePad) {
631631
return;

0 commit comments

Comments
 (0)