зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1541095: Remove an unnecessary static_cast in WritingModes.h. r=TYLin
The variables involved in the bitwise arithmetic are all of type uint8_t, so we end up with that type automatically (no need to bother with a static_cast). Note that we *do* need to declare the type (we can't use `auto`, or else the compiler wants to upgrade the local variable to have a wider type -- "int", I think -- and that then produces an build warning when we pass that variable as a uint8_t param further down). Differential Revision: https://phabricator.services.mozilla.com/D61893 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
77ad2585dd
Коммит
a4b224a290
|
@ -447,9 +447,9 @@ class WritingMode {
|
|||
MOZ_ASSERT(StyleWritingMode::VERTICAL.bits == 0x01 &&
|
||||
StyleWritingMode::VERTICAL_LR.bits == 0x04,
|
||||
"unexpected mask values");
|
||||
const auto wm = static_cast<uint8_t>(
|
||||
const uint8_t wm =
|
||||
((mWritingMode & StyleWritingMode::VERTICAL_LR).bits >> 1) |
|
||||
(mWritingMode & StyleWritingMode::VERTICAL).bits);
|
||||
(mWritingMode & StyleWritingMode::VERTICAL).bits;
|
||||
return PhysicalSideForBlockAxis(wm, GetEdge(aSide));
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче