-//-----------------------------------------------------------------------------
-inline DIR_TRAFF::DIR_TRAFF()
- : traff(DIR_NUM, 0)
-{
-}
-//-----------------------------------------------------------------------------
-inline DIR_TRAFF::DIR_TRAFF(const DIR_TRAFF & ts)
- : traff(ts.traff)
-{
-}
-//-----------------------------------------------------------------------------
-inline DIR_TRAFF::~DIR_TRAFF()
-{
-}
-//-----------------------------------------------------------------------------
-inline DIR_TRAFF & DIR_TRAFF::operator=(const DIR_TRAFF & ts)
-{
-traff = ts.traff;
-return *this;
-};
-//-----------------------------------------------------------------------------
-inline uint64_t & DIR_TRAFF::operator[](int idx)
-{
-return traff[idx];
-};
-//-----------------------------------------------------------------------------
-inline uint64_t DIR_TRAFF::operator[](int idx) const
-{
-return traff[idx];
+ public:
+ using ContainerType = std::vector<uint64_t>;
+ using IndexType = ContainerType::size_type;
+
+ DirTraff() noexcept : traff(DIR_NUM) {}
+ const uint64_t & operator[](IndexType idx) const noexcept { return traff[idx]; }
+ uint64_t & operator[](IndexType idx) noexcept { return traff[idx]; }
+ IndexType size() const noexcept { return traff.size(); }
+
+ void reset() noexcept
+ {
+ for (IndexType i = 0; i < traff.size(); ++i)
+ traff[i] = 0;
+ }
+
+ private:
+ ContainerType traff;