mirror of https://gitee.com/bigwinds/arangodb
use nullptr, don't include Thread.h when unnecessary
This commit is contained in:
parent
490d0a88ee
commit
f21561b25f
|
@ -96,7 +96,7 @@ std::string Node::uri() const {
|
|||
std::stringstream path;
|
||||
std::deque<std::string> names;
|
||||
names.push_front(name());
|
||||
while (par != 0) {
|
||||
while (par != nullptr) {
|
||||
names.push_front(par->name());
|
||||
par = par->_parent;
|
||||
}
|
||||
|
@ -243,8 +243,8 @@ Node const& Node::operator()(std::string const& path) const {
|
|||
|
||||
// lh-store
|
||||
Node const& Node::root() const {
|
||||
Node* par = _parent, * tmp = 0;
|
||||
while (par != 0) {
|
||||
Node* par = _parent, * tmp = nullptr;
|
||||
while (par != nullptr) {
|
||||
tmp = par;
|
||||
par = par->_parent;
|
||||
}
|
||||
|
@ -253,8 +253,8 @@ Node const& Node::root() const {
|
|||
|
||||
// rh-store
|
||||
Node& Node::root() {
|
||||
Node* par = _parent, * tmp = 0;
|
||||
while (par != 0) {
|
||||
Node* par = _parent, * tmp = nullptr;
|
||||
while (par != nullptr) {
|
||||
tmp = par;
|
||||
par = par->_parent;
|
||||
}
|
||||
|
@ -564,7 +564,7 @@ void Node::toBuilder(Builder& builder) const {
|
|||
// Print internals to ostream
|
||||
std::ostream& Node::print(std::ostream& o) const {
|
||||
Node const* par = _parent;
|
||||
while (par != 0) {
|
||||
while (par != nullptr) {
|
||||
par = par->_parent;
|
||||
o << " ";
|
||||
}
|
||||
|
|
|
@ -28,8 +28,6 @@
|
|||
|
||||
#include "Basics/Mutex.h"
|
||||
#include "Basics/MutexLocker.h"
|
||||
#include "Basics/Thread.h"
|
||||
#include "Basics/ConditionVariable.h"
|
||||
|
||||
#include <velocypack/Buffer.h>
|
||||
#include <velocypack/velocypack-aliases.h>
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
#define ARANGOD_CONSENSUS_STATE_H 1
|
||||
|
||||
#include "AgencyCommon.h"
|
||||
|
||||
#include "Basics/Thread.h"
|
||||
#include "Cluster/ClusterComm.h"
|
||||
|
||||
#include <velocypack/vpack.h>
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#define ARANGOD_CONSENSUS_STORE_H 1
|
||||
|
||||
#include "Node.h"
|
||||
#include "Basics/ConditionVariable.h"
|
||||
#include "Basics/Thread.h"
|
||||
|
||||
namespace arangodb {
|
||||
namespace consensus {
|
||||
|
|
|
@ -25,10 +25,9 @@
|
|||
#define ARANGOD_CONSENSUS_SUPERVISION_H 1
|
||||
|
||||
#include "AgencyCommon.h"
|
||||
#include "Node.h"
|
||||
|
||||
#include "Basics/Thread.h"
|
||||
#include "Agency/Node.h"
|
||||
#include "Basics/ConditionVariable.h"
|
||||
#include "Basics/Thread.h"
|
||||
|
||||
namespace arangodb {
|
||||
namespace consensus {
|
||||
|
|
Loading…
Reference in New Issue