Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
Signed-off-by: tiancaishaonvjituizi <[email protected]>
  • Loading branch information
tiancaishaonvjituizi committed Apr 20, 2022
1 parent 2eeb8bb commit f1fca39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paddle/phi/core/utils/type_registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ template <typename BaseT>
TypeInfo<BaseT> TypeRegistry<BaseT>::RegisterType(const std::string& type) {
std::lock_guard<std::mutex> guard(mutex_);
assert(name_to_id_.find(type) == name_to_id_.end());
assert(names_.size() < static_cast<decltype(names_.size())>(std::numeric_limits<int8_t>::max()));
assert(names_.size() < static_cast<decltype(names_.size())>(
std::numeric_limits<int8_t>::max()));
int8_t id = static_cast<int8_t>(names_.size());
names_.emplace_back(type);
name_to_id_[type] = id;
Expand Down

0 comments on commit f1fca39

Please sign in to comment.