Merge colour_set_inherit and unset_inherit into a single function.
This commit is contained in:
parent
af8cc763bf
commit
ea43444db7
1 changed files with 6 additions and 7 deletions
|
@ -15,14 +15,13 @@ function colour_none(): int
|
||||||
return MSZ_COLOUR_INHERIT;
|
return MSZ_COLOUR_INHERIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
function colour_set_inherit(int &$colour): void
|
function colour_set_inherit(int &$colour, bool $enabled = true): void
|
||||||
{
|
{
|
||||||
|
if ($enabled) {
|
||||||
$colour |= MSZ_COLOUR_INHERIT;
|
$colour |= MSZ_COLOUR_INHERIT;
|
||||||
}
|
} else {
|
||||||
|
|
||||||
function colour_unset_inherit(int &$colour): void
|
|
||||||
{
|
|
||||||
$colour &= ~MSZ_COLOUR_INHERIT;
|
$colour &= ~MSZ_COLOUR_INHERIT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function colour_get_inherit(int $colour): bool
|
function colour_get_inherit(int $colour): bool
|
||||||
|
|
Loading…
Add table
Reference in a new issue