Skip to content

Commit caf20b5

Browse files
committed
fix google-build-using-namespace
Signed-off-by: Matt Liberty <[email protected]>
1 parent 71328ef commit caf20b5

32 files changed

+148
-51
lines changed

src/cut/src/blifParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace blif_parser {
2828
namespace qi = boost::spirit::qi;
2929
namespace ascii = boost::spirit::ascii;
3030

31-
using namespace boost::placeholders;
31+
using boost::placeholders::_1;
3232

3333
using boost::spirit::ascii::space_type;
3434
using boost::spirit::ascii::string;

src/dst/src/BalancerConnection.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
#include "dst/Distributed.h"
2727
#include "utl/Logger.h"
2828

29-
using namespace dst;
30-
3129
BOOST_CLASS_EXPORT(dst::BalancerJobDescription)
3230
BOOST_CLASS_EXPORT(dst::BroadcastJobDescription)
3331

32+
namespace dst {
33+
3434
BalancerConnection::BalancerConnection(asio::io_context& service,
3535
LoadBalancer* owner,
3636
utl::Logger* logger)
@@ -218,6 +218,8 @@ void BalancerConnection::handle_read(boost::system::error_code const& err,
218218
}
219219
}
220220

221+
} // namespace dst
222+
221223
#if !SWIG && FMT_VERSION >= 100000
222224
namespace boost::asio::ip {
223225

src/dst/src/Distributed.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020
#include "dst/JobCallBack.h"
2121
#include "dst/JobMessage.h"
2222
#include "utl/Logger.h"
23+
2324
namespace dst {
24-
const int kMaxTries = 5;
25-
}
2625

27-
using namespace dst;
26+
constexpr int kMaxTries = 5;
2827

2928
Distributed::Distributed(utl::Logger* logger) : logger_(logger)
3029
{
@@ -259,3 +258,5 @@ void Distributed::addCallBack(JobCallBack* cb)
259258
{
260259
callbacks_.push_back(cb);
261260
}
261+
262+
} // namespace dst

src/dst/src/JobMessage.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "boost/serialization/unique_ptr.hpp"
1313
#include "dst/BalancerJobDescription.h"
1414

15-
using namespace dst;
15+
namespace dst {
1616

1717
template <class Archive>
1818
inline bool is_loading(const Archive& ar)
@@ -56,3 +56,5 @@ bool JobMessage::serializeMsg(SerializeType type,
5656
}
5757
return true;
5858
}
59+
60+
} // namespace dst

src/dst/test/cpp/TestBalancer.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "gtest/gtest.h"
1212
#include "utl/Logger.h"
1313

14-
using namespace dst;
14+
namespace dst {
1515

1616
TEST(test_suite, test_balancer)
1717
{
@@ -102,3 +102,5 @@ TEST(test_suite, test_balancer)
102102
// history i.e have invalid state.
103103
EXPECT_FALSE(balancer->addWorker(local_ip, worker_port_2));
104104
}
105+
106+
} // namespace dst

src/dst/test/cpp/TestDistributed.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include "gtest/gtest.h"
1111
#include "utl/Logger.h"
1212

13-
using namespace dst;
13+
namespace dst {
1414

1515
TEST(test_suite, test_distributed)
1616
{
@@ -47,3 +47,5 @@ TEST(test_suite, test_distributed)
4747
EXPECT_TRUE(dist->sendJob(msg, local_ip.c_str(), balancer_port, result));
4848
EXPECT_EQ(result.getJobType(), JobMessage::JobType::kSuccess);
4949
}
50+
51+
} // namespace dst

src/dst/test/cpp/TestWorker.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "gtest/gtest.h"
1313
#include "utl/Logger.h"
1414

15-
using namespace dst;
15+
namespace dst {
1616

1717
TEST(test_suite, test_worker)
1818
{
@@ -31,3 +31,5 @@ TEST(test_suite, test_worker)
3131
EXPECT_TRUE(dist->sendJob(msg, local_ip.c_str(), port, result));
3232
EXPECT_EQ(result.getJobType(), JobMessage::JobType::kSuccess);
3333
}
34+
35+
} // namespace dst

src/fin/src/DensityFill.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,20 @@ using utl::FIN;
2626

2727
namespace pt = boost::property_tree;
2828

29-
using namespace odb;
29+
using odb::dbBlock;
30+
using odb::dbChip;
31+
using odb::dbDatabase;
32+
using odb::dbFill;
33+
using odb::dbInstShapeItr;
34+
using odb::dbShape;
35+
using odb::dbTech;
36+
using odb::dbTechLayer;
37+
using odb::dbTechLayerDir;
38+
using odb::dbTechVia;
39+
using odb::dbVia;
40+
using odb::dbWire;
41+
using odb::dbWireShapeItr;
42+
using odb::Rect;
3043

3144
// The rules for OPC or non-OPC shapes on a layer from the JSON config
3245
struct DensityFillShapesConfig

src/fin/src/polygon.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77

88
namespace fin {
99

10-
using namespace boost::polygon::operators;
10+
using boost::polygon::operators::operator-=;
11+
using boost::polygon::operators::operator+=;
12+
using boost::polygon::operators::operator&;
13+
using boost::polygon::operators::operator+;
14+
using boost::polygon::operators::operator-;
1115

1216
using Rectangle = boost::polygon::rectangle_data<int>;
1317
using Polygon90 = boost::polygon::polygon_90_with_holes_data<int>;

src/odb/src/lefin/ArraySpacingParser.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "odb/db.h"
1212
#include "odb/lefin.h"
1313

14-
using namespace odb;
14+
namespace odb {
1515

1616
void ArraySpacingParser::setCutClass(std::string class_name)
1717
{
@@ -92,3 +92,5 @@ bool ArraySpacingParser::parse(const std::string& s)
9292
}
9393
return valid;
9494
}
95+
96+
} // namespace odb

0 commit comments

Comments
 (0)