<commit_before>
#include <glbinding/gl/gl.h>
#include <globjects/logging.h>

#include <gloperate-osg/OsgPainter.h>

#include <gloperate/painter/ViewportCapability.h>
#include <gloperate/painter/TargetFramebufferCapability.h>
#include <gloperate/painter/InputCapability.h>
#include <gloperate/painter/VirtualTimeCapability.h>


using namespace gl;
using namespace gloperate;


namespace gloperate_osg
{


/**
*  @brief
*    Constructor
*/
OsgPainter::OsgPainter(ResourceManager & resourceManager, const std::string & name)
: Painter(resourceManager, name)
, m_viewer(nullptr)
, m_embedded(nullptr)
, m_scene(nullptr)
, m_viewportX(0)
, m_viewportY(0)
, m_viewportWidth(0)
, m_viewportHeight(0)
, m_viewportCapability(new gloperate::ViewportCapability)
, m_targetFramebufferCapability(new gloperate::TargetFramebufferCapability)
, m_inputCapability(new gloperate::InputCapability)
, m_virtualTimeCapability(new gloperate::VirtualTimeCapability)
{
    // Register capabilities
    addCapability(m_viewportCapability);
    addCapability(m_targetFramebufferCapability);
    addCapability(m_inputCapability);
    addCapability(m_virtualTimeCapability);
}

/**
*  @brief
*    Destructor
*/
OsgPainter::~OsgPainter()
{
    osg_cleanup();
}

/**
*  @brief
*    Get OSG viewer
*/
osgViewer::Viewer * OsgPainter::viewer() const
{
    return m_viewer;
}
<commit_msg>Adapt to new make_unique style to add capability<commit_after>
#include <glbinding/gl/gl.h>
#include <globjects/logging.h>

#include <gloperate-osg/OsgPainter.h>

#include <gloperate/base/make_unique.hpp>
#include <gloperate/painter/ViewportCapability.h>
#include <gloperate/painter/TargetFramebufferCapability.h>
#include <gloperate/painter/InputCapability.h>
#include <gloperate/painter/VirtualTimeCapability.h>


using namespace gl;
using namespace gloperate;
using gloperate::make_unique;

namespace gloperate_osg
{


/**
*  @brief
*    Constructor
*/
OsgPainter::OsgPainter(ResourceManager & resourceManager, const std::string & name)
: Painter(resourceManager, name)
, m_viewer(nullptr)
, m_embedded(nullptr)
, m_scene(nullptr)
, m_viewportX(0)
, m_viewportY(0)
, m_viewportWidth(0)
, m_viewportHeight(0)
, m_viewportCapability(new gloperate::ViewportCapability)
, m_targetFramebufferCapability(new gloperate::TargetFramebufferCapability)
, m_inputCapability(new gloperate::InputCapability)
, m_virtualTimeCapability(new gloperate::VirtualTimeCapability)
{
    // Register capabilities
    m_viewportCapability = addCapability(make_unique<gloperate::ViewportCapability>());
    m_targetFramebufferCapability = addCapability(make_unique<gloperate::TargetFramebufferCapability>());
    m_inputCapability = addCapability(make_unique<gloperate::InputCapability>());
    m_virtualTimeCapability = addCapability(make_unique<gloperate::VirtualTimeCapability>());
}

/**
*  @brief
*    Destructor
*/
OsgPainter::~OsgPainter()
{
    osg_cleanup();
}

/**
*  @brief
*    Get OSG viewer
*/
osgViewer::Viewer * OsgPainter::viewer() const
{
    return m_viewer;
}

{'fraction_non_alphanumeric': 0.11922949186316838, 'fraction_numerical': 0.002656924609764198, 'mean_word_length': 6.926315789473684, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3301922', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1068, 'n_words': 147}