<commit_before>#include <Engine/Renderer/RenderTechnique/RenderTechnique.hpp>

#include <Engine/Renderer/Material/BlinnPhongMaterial.hpp>
#include <Engine/Renderer/RenderTechnique/RenderParameters.hpp>
#include <Engine/Renderer/RenderTechnique/ShaderConfigFactory.hpp>
#include <Engine/Renderer/RenderTechnique/ShaderProgramManager.hpp>

#include <Core/Utils/Log.hpp>

namespace Ra {
namespace Engine {

using namespace Core::Utils; // log

std::shared_ptr<Ra::Engine::RenderTechnique> RadiumDefaultRenderTechnique {nullptr};

RenderTechnique::RenderTechnique() : m_numActivePass {0} {
    for ( auto p = Index( 0 ); p < s_maxNbPasses; ++p )
    {
        m_activePasses[p]     = std::move( PassConfiguration( ShaderConfiguration(), nullptr ) );
        m_passesParameters[p] = nullptr;
    }
}

RenderTechnique::RenderTechnique( const RenderTechnique& o ) :
    m_numActivePass {o.m_numActivePass}, m_dirtyBits {o.m_dirtyBits}, m_setPasses {o.m_setPasses} {
    for ( auto p = Index( 0 ); p < m_numActivePass; ++p )
    {
        if ( hasConfiguration( p ) )
        {
            m_activePasses[p]     = o.m_activePasses[p];
            m_passesParameters[p] = o.m_passesParameters[p];
        }
    }
}

RenderTechnique::~RenderTechnique() = default;

void RenderTechnique::setConfiguration( const ShaderConfiguration& newConfig,
                                        Core::Utils::Index pass ) {
    m_numActivePass      = std::max( m_numActivePass, pass + 1 );
    m_activePasses[pass] = std::move( PassConfiguration( newConfig, nullptr ) );
    setDirty( pass );<commit_msg>[engine] warning: move prevent from copy elision.<commit_after>#include <Engine/Renderer/RenderTechnique/RenderTechnique.hpp>

#include <Engine/Renderer/Material/BlinnPhongMaterial.hpp>
#include <Engine/Renderer/RenderTechnique/RenderParameters.hpp>
#include <Engine/Renderer/RenderTechnique/ShaderConfigFactory.hpp>
#include <Engine/Renderer/RenderTechnique/ShaderProgramManager.hpp>

#include <Core/Utils/Log.hpp>

namespace Ra {
namespace Engine {

using namespace Core::Utils; // log

std::shared_ptr<Ra::Engine::RenderTechnique> RadiumDefaultRenderTechnique {nullptr};

RenderTechnique::RenderTechnique() : m_numActivePass {0} {
    for ( auto p = Index( 0 ); p < s_maxNbPasses; ++p )
    {
        m_activePasses[p]     = PassConfiguration( ShaderConfiguration(), nullptr );
        m_passesParameters[p] = nullptr;
    }
}

RenderTechnique::RenderTechnique( const RenderTechnique& o ) :
    m_numActivePass {o.m_numActivePass}, m_dirtyBits {o.m_dirtyBits}, m_setPasses {o.m_setPasses} {
    for ( auto p = Index( 0 ); p < m_numActivePass; ++p )
    {
        if ( hasConfiguration( p ) )
        {
            m_activePasses[p]     = o.m_activePasses[p];
            m_passesParameters[p] = o.m_passesParameters[p];
        }
    }
}

RenderTechnique::~RenderTechnique() = default;

void RenderTechnique::setConfiguration( const ShaderConfiguration& newConfig,
                                        Core::Utils::Index pass ) {
    m_numActivePass      = std::max( m_numActivePass, pass + 1 );
    m_activePasses[pass] = PassConfiguration( newConfig, nullptr );
    setDirty( pass );
{'fraction_non_alphanumeric': 0.11916771752837327, 'fraction_numerical': 0.0025220680958385876, 'mean_word_length': 3.8221884498480243, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '369680', 'n_tokens_mistral': 1021, 'n_tokens_neox': 987, 'n_words': 178}