mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-05 12:46:11 +00:00
tint: Optimization: Avoid dynamic cast in TINT_ASSERT
We don't need / want to consider whether the node in the map is of the SemanticNodeTypeFor type. Change-Id: Ia0deb3f4e4624bf47e2155fea05f91547d747310 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96144 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
b71bcdd45e
commit
70f7a1ee51
@ -79,7 +79,7 @@ class Info {
|
||||
template <typename AST>
|
||||
void Add(const AST* ast_node, const SemanticNodeTypeFor<AST>* sem_node) {
|
||||
// Check there's no semantic info already existing for the node
|
||||
TINT_ASSERT(Semantic, Get(ast_node) == nullptr);
|
||||
TINT_ASSERT(Semantic, map_.find(ast_node) == map_.end());
|
||||
map_.emplace(ast_node, sem_node);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user