mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Made client_id, transaction_id constructors explicit.
This commit is contained in:
@ -15,7 +15,7 @@ namespace wsrep
|
||||
: id_(-1)
|
||||
{ }
|
||||
template <typename I>
|
||||
client_id(I id)
|
||||
explicit client_id(I id)
|
||||
: id_(static_cast<type>(id))
|
||||
{ }
|
||||
type get() const { return id_; }
|
||||
|
@ -421,7 +421,7 @@ namespace wsrep
|
||||
int bf_abort(wsrep::seqno bf_seqno)
|
||||
{
|
||||
wsrep::unique_lock<wsrep::mutex> lock(mutex_);
|
||||
assert(mode_ == m_local);
|
||||
assert(mode_ == m_local || transaction_.is_streaming());
|
||||
return transaction_.bf_abort(lock, bf_seqno);
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#ifndef WSREP_TRANSACTION_ID_HPP
|
||||
#define WSREP_TRANSACTION_ID_HPP
|
||||
|
||||
#include <iosfwd>
|
||||
#include <iostream>
|
||||
|
||||
namespace wsrep
|
||||
{
|
||||
@ -20,11 +20,11 @@ namespace wsrep
|
||||
{ }
|
||||
|
||||
template <typename I>
|
||||
transaction_id(I id)
|
||||
explicit transaction_id(I id)
|
||||
: id_(static_cast<type>(id))
|
||||
{ }
|
||||
type get() const { return id_; }
|
||||
static unsigned long long undefined() { return type(-1); }
|
||||
static transaction_id undefined() { return transaction_id(-1); }
|
||||
bool is_undefined() const { return (id_ == type(-1)); }
|
||||
bool operator<(const transaction_id& other) const
|
||||
{
|
||||
|
Reference in New Issue
Block a user