mirror of https://github.com/YosysHQ/yosys.git
Removed at() method from RTLIL::IdString
This commit is contained in:
parent
04727c7e0f
commit
8e7361f128
|
@ -490,9 +490,9 @@ namespace {
|
|||
}
|
||||
|
||||
for (auto &conn : cell->connections()) {
|
||||
if (conn.first.size() != 2 || conn.first.at(0) != '\\')
|
||||
if (conn.first.size() != 2 || conn.first[0] != '\\')
|
||||
error(__LINE__);
|
||||
if (strchr(ports, conn.first.at(1)) == NULL)
|
||||
if (strchr(ports, conn.first[1]) == NULL)
|
||||
error(__LINE__);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -185,12 +185,11 @@ namespace RTLIL
|
|||
bool operator==(const char *rhs) const { return str() == rhs; }
|
||||
bool operator!=(const char *rhs) const { return str() != rhs; }
|
||||
|
||||
char at(size_t i) const {
|
||||
return c_str()[i];
|
||||
}
|
||||
|
||||
char operator[](size_t i) const {
|
||||
return c_str()[i];
|
||||
const char *p = c_str();
|
||||
for (; i != 0; i--, p++)
|
||||
log_assert(*p != 0);
|
||||
return *p;
|
||||
}
|
||||
|
||||
std::string substr(size_t pos = 0, size_t len = std::string::npos) const {
|
||||
|
|
|
@ -50,7 +50,7 @@ static bool consider_cell(RTLIL::Design *design, std::set<RTLIL::IdString> &dff_
|
|||
{
|
||||
if (cell->name[0] == '$' || dff_cells.count(cell->name))
|
||||
return false;
|
||||
if (cell->type.at(0) == '\\' && !design->modules_.count(cell->type))
|
||||
if (cell->type[0] == '\\' && !design->modules_.count(cell->type))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue