Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odb: rm obsolete dbIdValidation #6513

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/odb/include/odb/dbId.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@

namespace odb {

class dbIdValidation
{
public:
static uint invalidId() { return 0; }
static bool isId(const char* inid);
};

//
// April 2006 twg -
//
Expand Down
2 changes: 1 addition & 1 deletion src/odb/src/db/dbTechLayerAntennaRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ void _dbTechAntennaAreaElement::writeLef(const char* header,
lefout& writer) const
{
fmt::print(writer.out(), " {} {:g} ", header, _area);
if (_lyidx != dbIdValidation::invalidId()) {
if (_lyidx.isValid()) {
fmt::print(writer.out(),
"LAYER {} ",
dbTechLayer::getTechLayer(tech, _lyidx)->getName().c_str());
Expand Down
2 changes: 1 addition & 1 deletion src/odb/src/db/dbTechLayerAntennaRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class _dbTechAntennaAreaElement
private:
_dbTechAntennaAreaElement() = default;
double _area{-1.0};
dbId<_dbTechLayer> _lyidx{dbIdValidation::invalidId()};
dbId<_dbTechLayer> _lyidx;
};

//
Expand Down
18 changes: 0 additions & 18 deletions src/odb/src/db/dbTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,6 @@

namespace odb {

//
// dbIdValidation methods here
//
bool dbIdValidation::isId(const char* inid)
{
if (!inid) {
return false;
}

for (; *inid; inid++) {
if (isdigit(*inid) == 0) {
return false;
}
}

return true;
}

std::optional<dbOrientType::Value> dbOrientType::fromString(const char* orient)
{
std::optional<dbOrientType::Value> ret;
Expand Down
Loading