diff --git a/taichi/analysis/gen_offline_cache_key.cpp b/taichi/analysis/gen_offline_cache_key.cpp index bd0a1f1a36fb0..592908f6f239f 100644 --- a/taichi/analysis/gen_offline_cache_key.cpp +++ b/taichi/analysis/gen_offline_cache_key.cpp @@ -446,10 +446,10 @@ class ASTSerializer : public IRVisitor, public ExpressionVisitor { emit(static_cast(snode_tree_roots_.size())); for (const auto *snode : snode_tree_roots_) { std::string key; - if(snode_key_cache_.find(snode) == snode_key_cache_.end()){ + if (snode_key_cache_.find(snode) == snode_key_cache_.end()) { key = get_hashed_offline_cache_key_of_snode(snode); snode_key_cache_[snode] = key; - }else{ + } else { key = snode_key_cache_[snode]; } snode_key_cache_[snode] = key; diff --git a/taichi/analysis/offline_cache_util.cpp b/taichi/analysis/offline_cache_util.cpp index 66f51121ea392..2ea4d0df979da 100644 --- a/taichi/analysis/offline_cache_util.cpp +++ b/taichi/analysis/offline_cache_util.cpp @@ -155,7 +155,7 @@ std::string get_hashed_offline_cache_key_of_snode(const SNode *snode) { BinaryOutputSerializer serializer; serializer.initialize(); { - std::unordered_set visited; + std::unordered_set visited; get_offline_cache_key_of_snode_impl(snode, serializer, visited); } serializer.finalize();