summaryrefslogtreecommitdiff
path: root/src/mbgl/map/update.hpp
blob: dc383b819e01dfb0e0077a70546d718db0ca7557 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once

#include <mbgl/util/traits.hpp>

namespace mbgl {

enum class Update {
    Nothing                   = 0,
    Classes                   = 1 << 2,
    RecalculateStyle          = 1 << 3,
    RenderStill               = 1 << 4,
    Repaint                   = 1 << 5,
    AnnotationStyle           = 1 << 6,
    AnnotationData            = 1 << 7,
    Layout                    = 1 << 8
};

constexpr Update operator|(Update lhs, Update rhs) {
    return Update(mbgl::underlying_type(lhs) | mbgl::underlying_type(rhs));
}

constexpr Update& operator|=(Update& lhs, const Update& rhs) {
    return (lhs = lhs | rhs);
}

constexpr bool operator& (Update lhs, Update rhs) {
    return mbgl::underlying_type(lhs) & mbgl::underlying_type(rhs);
}

} // namespace mbgl