Skip to content

Commit

Permalink
Merge pull request #6513 from The-OpenROAD-Project-staging/odb-rm-dbI…
Browse files Browse the repository at this point in the history
…dValidation

odb: rm obsolete dbIdValidation
  • Loading branch information
maliberty authored Jan 13, 2025
2 parents 29fbad4 + 0ca23c5 commit 0f1f508
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 27 deletions.
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

0 comments on commit 0f1f508

Please sign in to comment.