mirror of https://gitee.com/bigwinds/arangodb
fix issues found by cppcheck
This commit is contained in:
parent
308545ce79
commit
e81a3c1ec1
|
@ -61,7 +61,7 @@ static void addEmptyVPackObject(std::string const& name,
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
AgencyPrecondition::AgencyPrecondition()
|
||||
: type(AgencyPrecondition::Type::NONE) {}
|
||||
: type(AgencyPrecondition::Type::NONE), empty(false) {}
|
||||
|
||||
AgencyPrecondition::AgencyPrecondition(std::string const& key, Type t, bool e)
|
||||
: key(AgencyCommManager::path(key)), type(t), empty(e) {}
|
||||
|
|
|
@ -183,7 +183,7 @@ class AgencyPrecondition {
|
|||
|
||||
class AgencyOperation {
|
||||
public:
|
||||
AgencyOperation(std::string const& key);
|
||||
explicit AgencyOperation(std::string const& key);
|
||||
|
||||
AgencyOperation(std::string const& key, AgencySimpleOperationType opType);
|
||||
|
||||
|
@ -405,7 +405,7 @@ class AgencyCommManager {
|
|||
static std::string generateStamp();
|
||||
|
||||
public:
|
||||
AgencyCommManager(std::string const& prefix) : _prefix(prefix) {}
|
||||
explicit AgencyCommManager(std::string const& prefix) : _prefix(prefix) {}
|
||||
|
||||
public:
|
||||
bool start();
|
||||
|
|
|
@ -77,8 +77,8 @@ struct trans_ret_t {
|
|||
index_t maxind;
|
||||
size_t failed;
|
||||
query_t result;
|
||||
trans_ret_t() : accepted(false), redirect("") {}
|
||||
trans_ret_t(bool a, std::string const& id) : accepted(a), redirect(id) {}
|
||||
trans_ret_t() : accepted(false), redirect(""), maxind(0), failed(0) {}
|
||||
trans_ret_t(bool a, std::string const& id) : accepted(a), redirect(id), maxind(0), failed(0) {}
|
||||
trans_ret_t(bool a, std::string const& id, index_t mi, size_t f,
|
||||
query_t const& res) : accepted(a), redirect(id), maxind(mi),
|
||||
failed(f), result(res) {}
|
||||
|
|
|
@ -573,8 +573,6 @@ query_t Agent::lastAckedAgo() const {
|
|||
}
|
||||
|
||||
trans_ret_t Agent::transact(query_t const& queries) {
|
||||
|
||||
std::vector<bool> applied;
|
||||
arangodb::consensus::index_t maxind = 0; // maximum write index
|
||||
|
||||
if (!_constituent.leading()) {
|
||||
|
@ -634,7 +632,6 @@ trans_ret_t Agent::transact(query_t const& queries) {
|
|||
|
||||
/// Write new entries to replicated state and store
|
||||
write_ret_t Agent::write(query_t const& query) {
|
||||
|
||||
std::vector<bool> applied;
|
||||
std::vector<index_t> indices;
|
||||
|
||||
|
|
Loading…
Reference in New Issue