mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-22 22:23:44 +00:00
Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
This commit is contained in:
35
base/base.hpp
Normal file
35
base/base.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#if defined(DEBUG) || defined(_DEBUG) || defined(NRELEASE)
|
||||
#define MY_DEBUG_DEFINED 1
|
||||
#else
|
||||
#define MY_DEBUG_DEFINED 0
|
||||
#endif
|
||||
|
||||
#if defined(RELEASE) || defined(_RELEASE) || defined(NDEBUG) || defined(_NDEBUG)
|
||||
#define MY_RELEASE_DEFINED 1
|
||||
#else
|
||||
#define MY_RELEASE_DEFINED 0
|
||||
#endif
|
||||
|
||||
static_assert(MY_DEBUG_DEFINED ^ MY_RELEASE_DEFINED, "Either Debug or Release should be defined, but not both.");
|
||||
|
||||
// #define DEBUG macro, which should be used with #ifdef.
|
||||
#if !MY_RELEASE_DEFINED
|
||||
#ifndef DEBUG
|
||||
#define DEBUG 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
// #include "internal/debug_new.hpp"
|
||||
// TODO: STL debug mode.
|
||||
#define IF_DEBUG_ELSE(a, b) (a)
|
||||
#else
|
||||
#define IF_DEBUG_ELSE(a, b) (b)
|
||||
#endif
|
||||
|
||||
// platform macroses
|
||||
#include "std/target_os.hpp"
|
||||
Reference in New Issue
Block a user