3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-06 06:03:23 +00:00

No implicit conversion from IdString to anything else

This commit is contained in:
Clifford Wolf 2014-08-02 18:58:40 +02:00
parent 768eb846c4
commit 04727c7e0f
16 changed files with 37 additions and 37 deletions

View file

@ -162,11 +162,7 @@ namespace RTLIL
*this = id;
}
const char*c_str() const {
return global_id_storage_.at(index_);
}
operator const char*() const {
const char *c_str() const {
return global_id_storage_.at(index_);
}
@ -193,6 +189,10 @@ namespace RTLIL
return c_str()[i];
}
char operator[](size_t i) const {
return c_str()[i];
}
std::string substr(size_t pos = 0, size_t len = std::string::npos) const {
if (len == std::string::npos || len >= strlen(c_str() + pos))
return std::string(c_str() + pos);