Skip to content

Commit

Permalink
fix an compile error in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaishaonvjituizi committed Apr 4, 2022
1 parent 635c38c commit 12de2dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddle/phi/core/utils/type_registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ 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() < std::numeric_limits<int8_t>::max());
assert(names_.size() < static_cast<decltype(names_.size())>(std::numeric_limits<int8_t>::max()));
int8_t id = names_.size();
names_.emplace_back(type);
name_to_id_[type] = id;
Expand Down

0 comments on commit 12de2dc

Please sign in to comment.