From 0ca23c54c2e58819fe794e19610f4686532c0489 Mon Sep 17 00:00:00 2001 From: Matt Liberty Date: Mon, 13 Jan 2025 06:48:54 +0000 Subject: [PATCH] odb: rm obsolete dbIdValidation Signed-off-by: Matt Liberty --- src/odb/include/odb/dbId.h | 7 ------- src/odb/src/db/dbTechLayerAntennaRule.cpp | 2 +- src/odb/src/db/dbTechLayerAntennaRule.h | 2 +- src/odb/src/db/dbTypes.cpp | 18 ------------------ 4 files changed, 2 insertions(+), 27 deletions(-) diff --git a/src/odb/include/odb/dbId.h b/src/odb/include/odb/dbId.h index 36be426f280..8c927ec8043 100644 --- a/src/odb/include/odb/dbId.h +++ b/src/odb/include/odb/dbId.h @@ -36,13 +36,6 @@ namespace odb { -class dbIdValidation -{ - public: - static uint invalidId() { return 0; } - static bool isId(const char* inid); -}; - // // April 2006 twg - // diff --git a/src/odb/src/db/dbTechLayerAntennaRule.cpp b/src/odb/src/db/dbTechLayerAntennaRule.cpp index 51b363f2204..5a6542ebf02 100644 --- a/src/odb/src/db/dbTechLayerAntennaRule.cpp +++ b/src/odb/src/db/dbTechLayerAntennaRule.cpp @@ -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()); diff --git a/src/odb/src/db/dbTechLayerAntennaRule.h b/src/odb/src/db/dbTechLayerAntennaRule.h index 3dc5070d4e1..a32ec70a79d 100644 --- a/src/odb/src/db/dbTechLayerAntennaRule.h +++ b/src/odb/src/db/dbTechLayerAntennaRule.h @@ -200,7 +200,7 @@ class _dbTechAntennaAreaElement private: _dbTechAntennaAreaElement() = default; double _area{-1.0}; - dbId<_dbTechLayer> _lyidx{dbIdValidation::invalidId()}; + dbId<_dbTechLayer> _lyidx; }; // diff --git a/src/odb/src/db/dbTypes.cpp b/src/odb/src/db/dbTypes.cpp index ff856b47d11..24fc0dc086d 100644 --- a/src/odb/src/db/dbTypes.cpp +++ b/src/odb/src/db/dbTypes.cpp @@ -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::fromString(const char* orient) { std::optional ret;