You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-27 21:01:50 +03:00
Reformat all code to coding standard
This commit is contained in:
@ -26,72 +26,75 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace BRM {
|
||||
namespace BRM
|
||||
{
|
||||
|
||||
RGNode::RGNode() : _color(0)
|
||||
{
|
||||
}
|
||||
|
||||
RGNode::RGNode(const RGNode &n) : out(n.out), in(n.in), _color(n._color)
|
||||
RGNode::RGNode(const RGNode& n) : out(n.out), in(n.in), _color(n._color)
|
||||
{
|
||||
}
|
||||
|
||||
RGNode::~RGNode()
|
||||
{
|
||||
set<RGNode *>::iterator it;
|
||||
set<RGNode*>::iterator it;
|
||||
|
||||
for (it = in.begin(); it != in.end(); ) {
|
||||
(*it)->out.erase(this);
|
||||
in.erase(it++);
|
||||
}
|
||||
|
||||
for (it = out.begin(); it != out.end(); ) {
|
||||
(*it)->in.erase(this);
|
||||
out.erase(it++);
|
||||
}
|
||||
for (it = in.begin(); it != in.end(); )
|
||||
{
|
||||
(*it)->out.erase(this);
|
||||
in.erase(it++);
|
||||
}
|
||||
|
||||
for (it = out.begin(); it != out.end(); )
|
||||
{
|
||||
(*it)->in.erase(this);
|
||||
out.erase(it++);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RGNode & RGNode::operator=(const RGNode &n)
|
||||
RGNode& RGNode::operator=(const RGNode& n)
|
||||
{
|
||||
_color = n._color;
|
||||
in = n.in;
|
||||
out = n.out;
|
||||
return *this;
|
||||
_color = n._color;
|
||||
in = n.in;
|
||||
out = n.out;
|
||||
return *this;
|
||||
}
|
||||
|
||||
uint64_t RGNode::color() const
|
||||
{
|
||||
return _color;
|
||||
return _color;
|
||||
}
|
||||
|
||||
void RGNode::color(uint64_t c)
|
||||
{
|
||||
_color = c;
|
||||
_color = c;
|
||||
}
|
||||
|
||||
void RGNode::addOutEdge(RGNode *n)
|
||||
void RGNode::addOutEdge(RGNode* n)
|
||||
{
|
||||
out.insert(n);
|
||||
n->in.insert(this);
|
||||
out.insert(n);
|
||||
n->in.insert(this);
|
||||
}
|
||||
|
||||
void RGNode::addInEdge(RGNode *n)
|
||||
void RGNode::addInEdge(RGNode* n)
|
||||
{
|
||||
in.insert(n);
|
||||
n->out.insert(this);
|
||||
in.insert(n);
|
||||
n->out.insert(this);
|
||||
}
|
||||
|
||||
void RGNode::removeOutEdge(RGNode *n)
|
||||
void RGNode::removeOutEdge(RGNode* n)
|
||||
{
|
||||
out.erase(n);
|
||||
n->in.erase(this);
|
||||
out.erase(n);
|
||||
n->in.erase(this);
|
||||
}
|
||||
|
||||
void RGNode::removeInEdge(RGNode *n)
|
||||
void RGNode::removeInEdge(RGNode* n)
|
||||
{
|
||||
in.erase(n);
|
||||
n->out.erase(this);
|
||||
in.erase(n);
|
||||
n->out.erase(this);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
Reference in New Issue
Block a user