Rename and simplify wxGridBlockCoords::ContainsBlock()
Change the return type of this function to a simple and clear bool instead of 3-valued int requiring a special explanation. This is simpler and not any less efficient as checking for whether one block contains another or the other one contains this one are separate operations anyhow. Rename the function to a more grammatically correct name. Also move it inline as it's now trivial enough for this to be worth it.
This commit is contained in:
@@ -1924,14 +1924,12 @@ public:
|
||||
bool ContainsCell(const wxGridCellCoords& cell) const;
|
||||
|
||||
/**
|
||||
Whether the blocks contain each other.
|
||||
Check whether this block contains another one.
|
||||
|
||||
@return
|
||||
1, if this block contains the other,
|
||||
-1, if the other block contains this one,
|
||||
0, otherwise.
|
||||
@true if @a other is entirely contained within this block.
|
||||
*/
|
||||
int ContainBlock(const wxGridBlockCoords& other) const;
|
||||
int ContainsBlock(const wxGridBlockCoords& other) const;
|
||||
|
||||
/**
|
||||
Calculates the result blocks by subtracting the other block from this
|
||||
|
Reference in New Issue
Block a user