[webkit-changes] [WebKit/WebKit] 2b9d1a: Simplify a case statement in Decimal.cpp slightly

Ahmad Saleem noreply at github.com
Tue Jun 27 16:23:43 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2b9d1a6ea04f101aa4cbc3277aeca15e97c25463
      https://github.com/WebKit/WebKit/commit/2b9d1a6ea04f101aa4cbc3277aeca15e97c25463
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2023-06-27 (Tue, 27 Jun 2023)

  Changed paths:
    M Source/WebCore/platform/Decimal.cpp

  Log Message:
  -----------
  Simplify a case statement in Decimal.cpp slightly

https://bugs.webkit.org/show_bug.cgi?id=258418

Reviewed by Chris Dumez.

Inspired: https://src.chromium.org/viewvc/blink?view=revision&revision=164071

Handling for StateDot and StateDotDigit was identical save for a
"state = StateDotDigit;" in the StateDot case that's a no-op in the
StateDotDigit case anyway.
This also removes unused 'isZero' as fly-by fix.

* Source/WebCore/platform/Decimal.cpp: Remove unused 'isZero'
(Decimal::fromString): Use 'StateDotDigit' code for 'StateDot' as simplification

Canonical link: https://commits.webkit.org/265567@main




More information about the webkit-changes mailing list