1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-31 18:24:25 +03:00

Introduced WSREP_ASSERT() for public headers.

Public headers may be compiled with different preprocessor
options than compilation units or private headers within a
project. Introduced a macro WSREP_ASSERT() to be mainly used in
public headers. The macro can be enabled by defining
WSREP_LIB_HAVE_DEBUG and is enabled by default for Debug type builds.
This commit is contained in:
Teemu Ollakka
2020-09-29 12:00:25 +03:00
parent 3f1c3dc22d
commit 89fea79f0b
15 changed files with 109 additions and 54 deletions

View File

@ -21,6 +21,7 @@
#ifndef WSREP_TRANSACTION_HPP
#define WSREP_TRANSACTION_HPP
#include "assert.hpp"
#include "provider.hpp"
#include "server_state.hpp"
#include "transaction_id.hpp"
@ -31,7 +32,6 @@
#include "client_service.hpp"
#include "xid.hpp"
#include <cassert>
#include <vector>
namespace wsrep
@ -130,8 +130,8 @@ namespace wsrep
void assign_xid(const wsrep::xid& xid)
{
assert(active());
assert(xid_.empty());
WSREP_ASSERT(active());
WSREP_ASSERT(xid_.empty());
xid_ = xid;
}
@ -211,6 +211,7 @@ namespace wsrep
int flags() const
{
WSREP_ASSERT(0);
return flags_;
}