openrw/rwlib/source/rw/defines.hpp

25 lines
537 B
C++
Raw Normal View History

#ifndef _LIBRW_DEFINES_HPP_
#define _LIBRW_DEFINES_HPP_
#if RW_DEBUG
2016-05-20 01:25:38 +01:00
#include <iostream>
2016-04-28 00:54:42 +01:00
#define RW_MESSAGE(msg) \
std::cout << __FILE__ << ":"<< __LINE__ << ": " << msg << std::endl
#define RW_ERROR(msg) \
std::cout << __FILE__ << ":"<< __LINE__ << ": " << msg << std::endl
#define RW_CHECK(cond, msg) \
2016-04-28 00:54:42 +01:00
if(!(cond)) RW_ERROR(msg)
#else
2016-04-28 00:54:42 +01:00
#define RW_MESSAGE(msg)
#define RW_ERROR(msg)
#define RW_CHECK(cond, msg)
#endif
2016-04-28 00:54:42 +01:00
#define RW_UNUSED(var) \
(void) var
#define RW_UNIMPLEMENTED(msg) \
RW_MESSAGE("Unimplemented" << msg)
#endif