From e97a5d59e0e3c542d7974cab90d554c98628fc67 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 8 Nov 2022 12:48:13 +0100 Subject: [PATCH] ApplyRule#GetFVVar(): return by const ref to avoid malloc(). --- lib/config/applyrule.cpp | 5 ----- lib/config/applyrule.hpp | 6 +++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/config/applyrule.cpp b/lib/config/applyrule.cpp index 86aed4a70..46fc356f7 100644 --- a/lib/config/applyrule.cpp +++ b/lib/config/applyrule.cpp @@ -37,11 +37,6 @@ String ApplyRule::GetPackage() const return m_Package; } -String ApplyRule::GetFVVar() const -{ - return m_FVVar; -} - Expression::Ptr ApplyRule::GetFTerm() const { return m_FTerm; diff --git a/lib/config/applyrule.hpp b/lib/config/applyrule.hpp index 2e3f1d3f8..3db14f10c 100644 --- a/lib/config/applyrule.hpp +++ b/lib/config/applyrule.hpp @@ -61,7 +61,11 @@ public: return m_FKVar; } - String GetFVVar() const; + inline const String& GetFVVar() const noexcept + { + return m_FVVar; + } + Expression::Ptr GetFTerm() const; bool GetIgnoreOnError() const; DebugInfo GetDebugInfo() const;