Skip to content
Permalink
Browse files
[WebGPU] Support equality comparison between SourceSpans
https://bugs.webkit.org/show_bug.cgi?id=241757

Patch by Kiet Ho <tho22@apple.com> on 2022-06-20
Reviewed by Myles C. Maxfield.

* Source/WebGPU/WGSL/SourceSpan.h:
(WGSL::SourceSpan::operator==):

Canonical link: https://commits.webkit.org/251683@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
tuankiet65 authored and webkit-commit-queue committed Jun 21, 2022
1 parent daaa1b7 commit 03dc6cb8e36fe981d419545961e40eb0eb4ef8b7
Showing 1 changed file with 8 additions and 0 deletions.
@@ -56,6 +56,14 @@ struct SourceSpan {
, m_length(end.m_offset - start.m_offset)
{
}

bool operator==(const SourceSpan& other)
{
return (m_line == other.m_line
&& m_lineOffset == other.m_lineOffset
&& m_offset == other.m_offset
&& m_length == other.m_length);
}
};

}

0 comments on commit 03dc6cb

Please sign in to comment.