From 83f03b10ffdaad6f7df9909a04c3deab3f37956c Mon Sep 17 00:00:00 2001
From: JamesJCode <13408010-JamesJCode@users.noreply.gitlab.com>
Date: Tue, 14 Jan 2025 21:07:46 +0000
Subject: [PATCH] Further netclass name method cleanup

---
 pcbnew/board_connected_item.cpp | 6 ------
 pcbnew/board_connected_item.h   | 5 -----
 pcbnew/footprint.cpp            | 2 +-
 3 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/pcbnew/board_connected_item.cpp b/pcbnew/board_connected_item.cpp
index 41f1066130..f86f3dc101 100644
--- a/pcbnew/board_connected_item.cpp
+++ b/pcbnew/board_connected_item.cpp
@@ -111,12 +111,6 @@ wxString BOARD_CONNECTED_ITEM::GetNetClassName() const
 }
 
 
-wxString BOARD_CONNECTED_ITEM::GetNetClassVariableSubstitutionName() const
-{
-    return GetEffectiveNetClass()->GetName();
-}
-
-
 wxString BOARD_CONNECTED_ITEM::GetNetname() const
 {
     return m_netinfo ? m_netinfo->GetNetname() : wxString();
diff --git a/pcbnew/board_connected_item.h b/pcbnew/board_connected_item.h
index 2d7ebca98d..8a33dfa996 100644
--- a/pcbnew/board_connected_item.h
+++ b/pcbnew/board_connected_item.h
@@ -185,11 +185,6 @@ public:
      */
     wxString GetNetClassName() const;
 
-    /*
-     * Returns the name of the effective netclass for variable substitutions
-     */
-    wxString GetNetClassVariableSubstitutionName() const;
-
     void SetLocalRatsnestVisible( bool aVisible ) { m_localRatsnestVisible = aVisible; }
     bool GetLocalRatsnestVisible() const { return m_localRatsnestVisible; }
 
diff --git a/pcbnew/footprint.cpp b/pcbnew/footprint.cpp
index 1b21053b5d..ec4e30d447 100644
--- a/pcbnew/footprint.cpp
+++ b/pcbnew/footprint.cpp
@@ -1046,7 +1046,7 @@ bool FOOTPRINT::ResolveTextVar( wxString* token, int aDepth ) const
                 else if( token->StartsWith( wxT( "NET_NAME" ) ) )
                     *token = pad->GetNetname();
                 else if( token->StartsWith( wxT( "NET_CLASS" ) ) )
-                    *token = pad->GetNetClassVariableSubstitutionName();
+                    *token = pad->GetNetClassName();
                 else
                     *token = pad->GetPinFunction();