summaryrefslogtreecommitdiff
path: root/src/mbgl/map/update.hpp
blob: ab8b10c65176c2d49bf823a524862cc6f513f0de (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
#pragma once

#include <mbgl/util/traits.hpp>
#include <mbgl/util/util.hpp>

namespace mbgl {

enum class Update {
    Nothing                   = 0,
    Repaint                   = 1 << 0,
    AnnotationStyle           = 1 << 6,
    AnnotationData            = 1 << 7
};

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

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

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

} // namespace mbgl