diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-10-05 17:10:40 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-05 17:10:40 +0000 |
commit | 9934cc2f2f1a6382269d0d2da6886113bfb2c309 (patch) | |
tree | 6e4f14e6f5b456a00eeec5aa5ed422e94eabfdc7 /fpdfsdk/pwl/cpwl_scroll_bar.h | |
parent | 39cf6a765ae349242289ec3287eaf4d6c5fd57f8 (diff) | |
download | pdfium-9934cc2f2f1a6382269d0d2da6886113bfb2c309.tar.xz |
Tidy PWL_FLOATRANGE
Remove unused form of constructor.
Initialize in header and default constructor (POD).
Use std::min/max
Change-Id: Ib2a37333d9f57ff2e2139a2cc1dea61416a8614b
Reviewed-on: https://pdfium-review.googlesource.com/c/43476
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/pwl/cpwl_scroll_bar.h')
-rw-r--r-- | fpdfsdk/pwl/cpwl_scroll_bar.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fpdfsdk/pwl/cpwl_scroll_bar.h b/fpdfsdk/pwl/cpwl_scroll_bar.h index 3c3c56e4bb..3592423a7d 100644 --- a/fpdfsdk/pwl/cpwl_scroll_bar.h +++ b/fpdfsdk/pwl/cpwl_scroll_bar.h @@ -64,21 +64,20 @@ class CPWL_SBButton final : public CPWL_Wnd { struct PWL_FLOATRANGE { public: - PWL_FLOATRANGE(); - PWL_FLOATRANGE(float min, float max); + PWL_FLOATRANGE() = default; bool operator==(const PWL_FLOATRANGE& that) const { return fMin == that.fMin && fMax == that.fMax; } bool operator!=(const PWL_FLOATRANGE& that) const { return !(*this == that); } - void Default(); + void Reset(); void Set(float min, float max); bool In(float x) const; float GetWidth() const; - float fMin; - float fMax; + float fMin = 0.0f; + float fMax = 0.0f; }; struct PWL_SCROLL_PRIVATEDATA { |