Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
1.5.3, 6.1.1
-
None
Description
struct PartitionInfo seems to have some redundancy:
struct PartitionInfo |
{
|
int64_t min;
|
int64_t max;
|
union |
{
|
int128_t int128Min;
|
int64_t min_;
|
};
|
union |
{
|
int128_t int128Max;
|
int64_t max_;
|
};
|
uint64_t status;
|
....
|
};
|
It's not clear why have two int64_t members for "min" and two int64_t members for "max".
Either of them should be removed.
Also, to avoid casts, we could add members for unsigned variants.
Something like this should do:
union PartitionValue |
{
|
int64_t m_sint64;
|
uint64_t m_uint64;
|
int128_t m_sint128;
|
};
|
 |
struct PartitionInfo |
{
|
PartitionValue m_min;
|
PartitionValue m_max;
|
uint64_t m_status;
|
}
|