You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
clang format apply
This commit is contained in:
@ -34,42 +34,39 @@ namespace BRM
|
||||
// Logical partition number descriptor
|
||||
struct LogicalPartition
|
||||
{
|
||||
uint16_t dbroot; // dbroot #
|
||||
uint32_t pp; // physical partition #
|
||||
uint16_t seg; // segment #
|
||||
uint16_t dbroot; // dbroot #
|
||||
uint32_t pp; // physical partition #
|
||||
uint16_t seg; // segment #
|
||||
|
||||
LogicalPartition() : dbroot ((uint16_t) - 1),
|
||||
pp ((uint32_t) - 1),
|
||||
seg ((uint16_t) - 1) {}
|
||||
LogicalPartition() : dbroot((uint16_t)-1), pp((uint32_t)-1), seg((uint16_t)-1)
|
||||
{
|
||||
}
|
||||
|
||||
LogicalPartition(uint16_t d, uint32_t p, uint16_t s) : dbroot(d),
|
||||
pp(p),
|
||||
seg(s)
|
||||
{}
|
||||
LogicalPartition(uint16_t d, uint32_t p, uint16_t s) : dbroot(d), pp(p), seg(s)
|
||||
{
|
||||
}
|
||||
|
||||
bool operator<( const LogicalPartition& n ) const
|
||||
{
|
||||
return ((pp < n.pp) ||
|
||||
(pp == n.pp && seg < n.seg) ||
|
||||
(pp == n.pp && seg == n.seg && dbroot < n.dbroot));
|
||||
}
|
||||
bool operator<(const LogicalPartition& n) const
|
||||
{
|
||||
return ((pp < n.pp) || (pp == n.pp && seg < n.seg) || (pp == n.pp && seg == n.seg && dbroot < n.dbroot));
|
||||
}
|
||||
|
||||
void serialize(messageqcpp::ByteStream& b) const
|
||||
{
|
||||
b << (uint16_t)dbroot;
|
||||
b << (uint32_t)pp;
|
||||
b << (uint16_t)seg;
|
||||
}
|
||||
void serialize(messageqcpp::ByteStream& b) const
|
||||
{
|
||||
b << (uint16_t)dbroot;
|
||||
b << (uint32_t)pp;
|
||||
b << (uint16_t)seg;
|
||||
}
|
||||
|
||||
void unserialize(messageqcpp::ByteStream& b)
|
||||
{
|
||||
b >> (uint16_t&)dbroot;
|
||||
b >> (uint32_t&)pp;
|
||||
b >> (uint16_t&)seg;
|
||||
}
|
||||
void unserialize(messageqcpp::ByteStream& b)
|
||||
{
|
||||
b >> (uint16_t&)dbroot;
|
||||
b >> (uint32_t&)pp;
|
||||
b >> (uint16_t&)seg;
|
||||
}
|
||||
|
||||
/** @bug4816. For output to user purpose */
|
||||
std::string toString() const;
|
||||
/** @bug4816. For output to user purpose */
|
||||
std::string toString() const;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -85,4 +82,4 @@ messageqcpp::ByteStream& operator<<(messageqcpp::ByteStream& bs, const LogicalPa
|
||||
|
||||
messageqcpp::ByteStream& operator>>(messageqcpp::ByteStream& bs, LogicalPartition& rhs);
|
||||
|
||||
}
|
||||
} // namespace BRM
|
||||
|
Reference in New Issue
Block a user