From 3fc3d598e7de5401e919823a8bc931fd4e81e761 Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Mon, 15 Mar 2021 10:54:50 -0700 Subject: Use NEXTPNR_NAMESPACE macro's now that headers are seperated. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- fpga_interchange/bits.cc | 6 +++--- fpga_interchange/dynamic_bitarray.cc | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/fpga_interchange/bits.cc b/fpga_interchange/bits.cc index ac92edd..ef201b2 100644 --- a/fpga_interchange/bits.cc +++ b/fpga_interchange/bits.cc @@ -20,9 +20,9 @@ #include "gtest/gtest.h" #include "bits.h" -#include "nextpnr.h" +#include "nextpnr_namespaces.h" -namespace nextpnr { +NEXTPNR_NAMESPACE_BEGIN class BitsTest : public ::testing::Test { @@ -55,4 +55,4 @@ TEST_F(BitsTest, ctz) } } -}; // namespace nextpnr +NEXTPNR_NAMESPACE_END diff --git a/fpga_interchange/dynamic_bitarray.cc b/fpga_interchange/dynamic_bitarray.cc index 0e1a4a7..5b2d84d 100644 --- a/fpga_interchange/dynamic_bitarray.cc +++ b/fpga_interchange/dynamic_bitarray.cc @@ -19,10 +19,11 @@ #include "gtest/gtest.h" -#include "dynamic_bitarray.h" #include +#include "dynamic_bitarray.h" +#include "nextpnr_namespaces.h" -namespace nextpnr { +NEXTPNR_NAMESPACE_BEGIN class DynamicBitarrayTest : public ::testing::Test { @@ -32,7 +33,7 @@ TEST_F(DynamicBitarrayTest, oneshot) { for (size_t i = 0; i < 100; ++i) { std::vector simple_storage; - nextpnr::DynamicBitarray<> bitarray; + DynamicBitarray<> bitarray; ASSERT_EQ(bitarray.bits_per_value(), size_t(CHAR_BIT)); simple_storage.resize(i); @@ -57,7 +58,7 @@ TEST_F(DynamicBitarrayTest, oneshot) TEST_F(DynamicBitarrayTest, resize) { std::vector simple_storage; - nextpnr::DynamicBitarray<> bitarray; + DynamicBitarray<> bitarray; for (size_t i = 0; i < 100; ++i) { @@ -80,7 +81,7 @@ TEST_F(DynamicBitarrayTest, resize) TEST_F(DynamicBitarrayTest, fill) { - nextpnr::DynamicBitarray<> bitarray; + DynamicBitarray<> bitarray; for (size_t i = 0; i < 100; ++i) { bitarray.resize(i); @@ -97,4 +98,4 @@ TEST_F(DynamicBitarrayTest, fill) } } -}; // namespace nextpnr +NEXTPNR_NAMESPACE_END -- cgit v1.2.3