Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74c82424 authored by Michael Wright's avatar Michael Wright
Browse files

Use size_t instead of int for integer_sequence.size()

Also skip an unnecessary value initialization.

Bug: 160010896
Test: atest libinput_tests
Change-Id: Ibe4dfc587f3cba9ed2ebd5e9ff95f771bf571123
parent eb8942b3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -68,10 +68,10 @@ inline constexpr auto flag_count = sizeof(F) * __CHAR_BIT__;

template <typename F, typename T, T... I>
constexpr auto generate_flag_values(std::integer_sequence<T, I...> seq) {
    constexpr int count = seq.size();
    constexpr size_t count = seq.size();

    std::array<F, count> values{};
    for (int i = 0, v = 0; v < count; ++i) {
    for (size_t i = 0, v = 0; v < count; ++i) {
        values[v++] = static_cast<F>(T{1} << i);
    }