FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
macro.hpp
Go to the documentation of this file.
1
16
17#pragma once
18
19#include "lib/log.hpp"
20
43#define return_if(condition, value, ...) \
44 if (condition) { \
45 __VA_OPT__(logger(__VA_ARGS__);) \
46 return value; \
47 }
48
65#define break_if(condition, ...) \
66 if (condition) { \
67 __VA_OPT__(logger(__VA_ARGS__);) \
68 break; \
69 }
70
87#define continue_if(condition, ...) \
88 if (condition) { \
89 __VA_OPT__(logger(__VA_ARGS__);) \
90 continue; \
91 }
92
115#define log_if(condition, ...) \
116 if (condition) { \
117 logger(__VA_ARGS__); \
118 }
119
120/* vim: set expandtab fdm=marker ts=2 sw=2 tw=100 et :*/
A library for file logging.