From d772a56ae17526225b4740e7b0a63fc3bd16d508 Mon Sep 17 00:00:00 2001 From: Felipe Garay Date: Tue, 20 Feb 2024 13:55:43 -0800 Subject: [PATCH] fix some clang-tidy Signed-off-by: Felipe Garay --- src/odb/src/db/dbScanInst.cpp | 2 +- src/odb/test/cpp/scan/TestScanChain.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/odb/src/db/dbScanInst.cpp b/src/odb/src/db/dbScanInst.cpp index 4c08132c9d5..6d433e4dd3d 100644 --- a/src/odb/src/db/dbScanInst.cpp +++ b/src/odb/src/db/dbScanInst.cpp @@ -251,7 +251,7 @@ std::vector dbScanInst::getInsts() const std::vector insts; - for (dbId id : scan_inst->insts_) { + for (const dbId& id : scan_inst->insts_) { insts.push_back((dbInst*) block->_inst_tbl->getPtr((dbId<_dbInst>) id)); } diff --git a/src/odb/test/cpp/scan/TestScanChain.cpp b/src/odb/test/cpp/scan/TestScanChain.cpp index 8df28725a35..6a8b1ae9722 100644 --- a/src/odb/test/cpp/scan/TestScanChain.cpp +++ b/src/odb/test/cpp/scan/TestScanChain.cpp @@ -36,11 +36,11 @@ #include "gmock/gmock.h" #include "gtest/gtest.h" #include "helper.h" +#include "env.h" +namespace odb { namespace { -using namespace odb; - constexpr std::string_view kPartition1 = "CHAIN_1_FALLING_1"; constexpr std::string_view kPartition2 = "CHAIN_1_RISING_1"; @@ -70,7 +70,7 @@ class TestScanChain : public testing::Test { db_ = create2LevetDbWithBTerms(); block_ = db_->getChip()->getBlock(); - tmp_path_ = std::string(std::getenv("BASE_DIR")) + "/results/TestScanChain"; + tmp_path_ = testTmpPath("/results/TestScanChain"); dft_ = block_->createDft(); std::vector instances_names = {"i1", "i2", "i3"}; @@ -206,3 +206,4 @@ TEST_F(TestScanChain, CreateScanChainWithPartition) } } // namespace +} // namespace odb