From 2684518a9cdc063e0b17f73bdba1f6fc6ef93e46 Mon Sep 17 00:00:00 2001 From: "Siang-Yun (Sonia) Lee" Date: Thu, 18 Apr 2024 19:37:10 +0200 Subject: [PATCH] minor fixes --- include/mockturtle/views/names_view.hpp | 34 ++++++------------------- test/views/names_view.cpp | 2 +- 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/include/mockturtle/views/names_view.hpp b/include/mockturtle/views/names_view.hpp index 97c43ce91..e633b912b 100644 --- a/include/mockturtle/views/names_view.hpp +++ b/include/mockturtle/views/names_view.hpp @@ -24,13 +24,13 @@ */ /*! - \file names_view.hpp - \brief Implements methods to declare names for network signals + \file names_view.hpp + \brief Implements methods to declare names for network signals - \author Heinz Riener - \author Marcel Walter - \author Mathias Soeken - \author Siang-Yun (Sonia) Lee + \author Heinz Riener + \author Marcel Walter + \author Mathias Soeken + \author Siang-Yun (Sonia) Lee */ #pragma once @@ -68,9 +68,9 @@ class names_view : public Ntk if ( this != &named_ntk ) // Check for self-assignment { Ntk::operator=( named_ntk ); - _signal_names = named_ntk.get_signal_names(); + _signal_names = named_ntk._signal_names; _network_name = named_ntk._network_name; - _output_names = named_ntk.get_output_names(); + _output_names = named_ntk._output_names; } return *this; } @@ -123,15 +123,6 @@ class names_view : public Ntk return _network_name; } - /*! \brief Gets all signal name. - * - * \return All signal names - */ - std::map get_signal_names() const noexcept - { - return _signal_names; - } - /*! \brief Checks if a signal has a name. * * Note that complemented signals may have different names. @@ -204,15 +195,6 @@ class names_view : public Ntk return _output_names.at( index ); } - /*! \brief Gets all names of all outputs. - * - * \return All output names. - */ - std::map get_output_names() const - { - return _output_names; - } - private: std::string _network_name; std::map _signal_names; diff --git a/test/views/names_view.cpp b/test/views/names_view.cpp index 276d173a0..5faebefaa 100644 --- a/test/views/names_view.cpp +++ b/test/views/names_view.cpp @@ -89,7 +89,7 @@ void test_copy_names_view() named_ntk.set_name( c, "c" ); named_ntk.set_output_name( 0, "f" ); - // test & operator= for named_ntk_empty and non-empty ntk. + // test operator= for empty and non-empty ntk. names_view named_ntk_empty{}; named_ntk_empty = ntk; CHECK( named_ntk_empty.get_network_name() == "" );