polserver/pol-core/bscript/compiler/ast/FunctionReference.cpp
turleypol da2943acb8
Tidy copy initialization (#859)
* trigger tidy

* copy&move BApplicPtr obj
always commit tidy changes

* move PolObject

* fix house add_component

* Automated clang-tidy change: performance-unnecessary-copy-initialization,performance-unnecessary-value-param

* Revert "Automated clang-tidy change: performance-unnecessary-copy-initialization,performance-unnecessary-value-param"

This reverts commit bb6aab13dbdfa4aaf420cdaafaf22940f241fc5b.

* performance-unnecessary-value-param gives some weird suggestions

* Automated clang-tidy change: performance-unnecessary-copy-initialization

* minor performance improvements

* added used tidy check

* missing dependency

* renamed build so its no longer requires?

* better add docs for the sneaky fix

* silence pr check, not all headers can be compiled seperatly

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-19 08:17:28 +01:00

26 lines
701 B
C++

#include "FunctionReference.h"
#include "bscript/compiler/ast/NodeVisitor.h"
namespace Pol::Bscript::Compiler
{
FunctionReference::FunctionReference( const SourceLocation& source_location, std::string name,
std::shared_ptr<FunctionLink> function_link )
: Value( source_location ),
name( std::move( name ) ),
function_link( std::move( function_link ) )
{
}
void FunctionReference::accept( NodeVisitor& visitor )
{
visitor.visit_function_reference( *this );
}
void FunctionReference::describe_to( std::string& w ) const
{
fmt::format_to( std::back_inserter( w ), "function-reference(@{})", name );
}
} // namespace Pol::Bscript::Compiler