Skip to content

Commit dc1ee44

Browse files
committed
follow some comments whit pr 854 after committed
1 parent b132fde commit dc1ee44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

paddle/function/Function.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ real FuncConfig::get<real>(const std::string& key) const {
3232

3333
template <>
3434
FuncConfig& FuncConfig::set<size_t>(const std::string& key, size_t v) {
35-
CHECK(valueMap_.count(key) == 0) << "Duplicated value: " << key;
35+
CHECK_EQ(valueMap_.count(key), 0) << "Duplicated value: " << key;
3636
valueMap_[key].s = v;
3737
return *this;
3838
}
3939

4040
template <>
4141
FuncConfig& FuncConfig::set<real>(const std::string& key, real v) {
42-
CHECK(valueMap_.count(key) == 0) << "Duplicated value: " << key;
42+
CHECK_EQ(valueMap_.count(key), 0) << "Duplicated value: " << key;
4343
valueMap_[key].r = v;
4444
return *this;
4545
}

0 commit comments

Comments
 (0)