| 1 |
/************************************************************************* |
| 2 |
* 2022 Tóth János * |
| 3 |
* * |
| 4 |
* This program is free software; it is licensed under the terms of the * |
| 5 |
* GNU General Public License v2 or later. See file LICENSE for details. * |
| 6 |
*************************************************************************/ |
| 7 |
|
| 8 |
// Useful macros for development. Will not survive optimization. |
| 9 |
|
| 10 |
#pragma once |
| 11 |
|
| 12 |
#ifndef NDEBUG |
| 13 |
#define TODO() _verify(false, __FILE__, __LINE__, "TODO") |
| 14 |
#define UNREACHABLE() _verify(false, __FILE__, __LINE__, "UNREACHABLE") |
| 15 |
#define VERIFY(x) _verify((x), __FILE__, __LINE__, "VERIFY FAILED: " #x) |
| 16 |
#else |
| 17 |
#define TODO() |
| 18 |
#define UNREACHABLE() |
| 19 |
#define VERIFY(x) |
| 20 |
#endif |
| 21 |
|
| 22 |
namespace yade { |
| 23 |
namespace ymport { |
| 24 |
namespace foamfile { |
| 25 |
|
| 26 |
void _verify(bool cond, const char* file, int line, const char* msg); |
| 27 |
|
| 28 |
} // namespace foamfile |
| 29 |
} // namespace ymport |
| 30 |
} // namespace yade |