1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

Updated wsrep-API, added -Wconversion to compiler flags, fixed errors.

This commit is contained in:
Teemu Ollakka
2019-10-10 13:54:05 +03:00
parent 58aa3e821f
commit 477a71dd46
18 changed files with 107 additions and 88 deletions

View File

@ -21,6 +21,7 @@
#define WSREP_CLIENT_ID_HPP
#include <ostream>
#include <limits>
namespace wsrep
{
@ -29,14 +30,14 @@ namespace wsrep
public:
typedef unsigned long long type;
client_id()
: id_(-1)
: id_(std::numeric_limits<type>::max())
{ }
template <typename I>
explicit client_id(I id)
: id_(static_cast<type>(id))
{ }
type get() const { return id_; }
static type undefined() { return -1; }
static type undefined() { return std::numeric_limits<type>::max(); }
bool operator<(const client_id& other) const
{
return (id_ < other.id_);

View File

@ -21,6 +21,7 @@
#define WSREP_TRANSACTION_ID_HPP
#include <iostream>
#include <limits>
namespace wsrep
{
@ -31,7 +32,7 @@ namespace wsrep
transaction_id()
: id_(-1)
: id_(std::numeric_limits<type>::max())
{ }
template <typename I>

View File

@ -97,7 +97,7 @@ namespace wsrep
wsrep::view::status status() const
{ return status_; }
ssize_t capabilities() const
int capabilities() const
{ return capabilities_; }
ssize_t own_index() const