Commit 95a81328 authored by Miyoung Shin's avatar Miyoung Shin Committed by Commit Bot

Refactor: unsigned short -> uint16_t in third_party/blink/renderer/platform/geometry/layout_unit.h

- unsigned short -> uint16_t.
- No logic changes.
- Reference: https://google.github.io/styleguide/cppguide.html#Integer_Types

Bug: 929986
Change-Id: I122235e4673889c6607ba6d129cc651e2dc20841
Reviewed-on: https://chromium-review.googlesource.com/c/1491152Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Miyoung Shin <myid.shin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635962}
parent 03505df6
......@@ -67,7 +67,7 @@ class LayoutUnit {
public:
constexpr LayoutUnit() : value_(0) {}
explicit LayoutUnit(int value) { SetValue(value); }
explicit LayoutUnit(unsigned short value) { SetValue(value); }
explicit LayoutUnit(uint16_t value) { SetValue(value); }
explicit LayoutUnit(unsigned value) { SetValue(value); }
explicit LayoutUnit(unsigned long value) {
value_ = base::saturated_cast<int>(value * kFixedPointDenominator);
......@@ -417,7 +417,7 @@ inline LayoutUnit operator*(const LayoutUnit& a, int b) {
return a * LayoutUnit(b);
}
inline LayoutUnit operator*(const LayoutUnit& a, unsigned short b) {
inline LayoutUnit operator*(const LayoutUnit& a, uint16_t b) {
return a * LayoutUnit(b);
}
......@@ -433,7 +433,7 @@ inline LayoutUnit operator*(const LayoutUnit& a, unsigned long long b) {
return a * LayoutUnit(b);
}
inline LayoutUnit operator*(unsigned short a, const LayoutUnit& b) {
inline LayoutUnit operator*(uint16_t a, const LayoutUnit& b) {
return LayoutUnit(a) * b;
}
......@@ -481,7 +481,7 @@ inline LayoutUnit operator/(const LayoutUnit& a, int b) {
return a / LayoutUnit(b);
}
inline LayoutUnit operator/(const LayoutUnit& a, unsigned short b) {
inline LayoutUnit operator/(const LayoutUnit& a, uint16_t b) {
return a / LayoutUnit(b);
}
......@@ -509,7 +509,7 @@ inline LayoutUnit operator/(const int a, const LayoutUnit& b) {
return LayoutUnit(a) / b;
}
inline LayoutUnit operator/(unsigned short a, const LayoutUnit& b) {
inline LayoutUnit operator/(uint16_t a, const LayoutUnit& b) {
return LayoutUnit(a) / b;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment