Files
MapLibreParticleLab/include/mbgl/platform/event.hpp
Bruno de Oliveira Abinader 3ae506ee13 [core] Use NDEBUG instead of DEBUG
CMake defines 'NDEBUG' by default for release build, so we can check if
that's not defined instead of using 'DEBUG' for debug build.
2016-08-05 11:42:22 +02:00

59 lines
959 B
C++

#pragma once
#include <cstdint>
namespace mbgl {
enum class EventSeverity : uint8_t {
Debug,
Info,
Warning,
Error,
};
enum class Event : uint8_t {
General,
Setup,
Shader,
ParseStyle,
ParseTile,
Render,
Style,
Database,
HttpRequest,
Sprite,
Image,
OpenGL,
JNI,
Android,
Crash,
Glyph,
};
struct EventPermutation {
const EventSeverity severity;
const Event event;
constexpr bool operator==(const EventPermutation &rhs) const {
return severity == rhs.severity && event == rhs.event;
}
};
constexpr EventSeverity disabledEventSeverities[] = {
#ifdef NDEBUG
EventSeverity(-1) // Avoid zero size array
#else
EventSeverity::Debug
#endif
};
constexpr Event disabledEvents[] = {
Event(-1) // Avoid zero size array
};
constexpr EventPermutation disabledEventPermutations[] = {
{ EventSeverity::Debug, Event::Shader }
};
} // namespace mbgl