Skip to content

Commit

Permalink
Drop redundant check in skipOptionalSVGSpacesOrDelimiter
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=263272

Reviewed by Simon Fraser.

Merge: https://chromium-review.googlesource.com/c/chromium/src/+/2642784

skipOptionalSVGSpaces() returns true if this condition (m_position < m_end) is
true, so we don't need to check it again.

* Source/WebCore/svg/SVGParserUtilities.h:
(skipOptionalSVGSpacesOrDelimiter):

Canonical link: https://commits.webkit.org/269478@main
  • Loading branch information
Ahmad-S792 authored and Ahmad Saleem committed Oct 18, 2023
1 parent f0939c5 commit 56bcdb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WebCore/svg/SVGParserUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ template<typename CharacterType> constexpr bool skipOptionalSVGSpacesOrDelimiter
if (characters.hasCharactersRemaining() && !isSVGSpace(*characters) && *characters != delimiter)
return false;
if (skipOptionalSVGSpaces(characters)) {
if (characters.hasCharactersRemaining() && *characters == delimiter) {
if (*characters == delimiter) {
characters++;
skipOptionalSVGSpaces(characters);
}
Expand Down

0 comments on commit 56bcdb9

Please sign in to comment.