<commit_before>// For conditions of distribution and use, see copyright notice in LICENSE

#include "StableHeaders.h"
#include "DebugOperatorNew.h"

#define MATH_OGRE_INTEROP

#include "EC_Camera.h"
#include "EC_Mesh.h"
#include "EC_Placeable.h"
#include "OgreRenderingModule.h"
#include "OgreWorld.h"
#include "TextureAsset.h"
#include "Renderer.h"

#include "Entity.h"
#include "FrameAPI.h"
#include "Scene.h"
#include "Profiler.h"
#include "LoggingFunctions.h"
#include "Application.h"
#include "UiAPI.h"
#include "UiMainWindow.h"
#include "AttributeMetadata.h"

#include <Ogre.h>

#include <QDir>
#include <QDateTime>

#include "MemoryLeakCheck.h"

using namespace OgreRenderer;

EC_Camera::EC_Camera(Scene* scene) :
    IComponent(scene),
    upVector(this, "Up vector", float3::unitY),
    nearPlane(this, "Near plane", 0.1f),
    farPlane(this, "Far plane", 2000.f),
    verticalFov(this, "Vertical FOV", 45.f),
    aspectRatio(this, "Aspect ratio", ""),
    attached_(false),
    camera_(0),
    query_(0),
    queryFrameNumber_(-1)
{
    static AttributeMetadata minZero;
    static bool metadataInitialized = false;
    if (!metadataInitialized)
        minZero.minimum = "0.0";
    nearPlane.SetMetadata(&minZero);

    if (scene)
        world_ = scene->GetWorld<OgreWorld>();
    connect(this, SIGNAL(ParentEntitySet()), SLOT(UpdateSignals()));
    if (framework)
        connect(framework->Frame(), SIGNAL(Updated(float)), SLOT(OnUpdated(float)));
    connect(this, SIGNAL(AttributeChanged(IAttribute*, AttributeChange::Type)), SLOT(OnAttributeUpdated(IAttribute*)));
}<commit_msg>Set static bool metadataInitialized to true after the meta data has been initialized.<commit_after>// For conditions of distribution and use, see copyright notice in LICENSE

#include "StableHeaders.h"
#include "DebugOperatorNew.h"

#define MATH_OGRE_INTEROP

#include "EC_Camera.h"
#include "EC_Mesh.h"
#include "EC_Placeable.h"
#include "OgreRenderingModule.h"
#include "OgreWorld.h"
#include "TextureAsset.h"
#include "Renderer.h"

#include "Entity.h"
#include "FrameAPI.h"
#include "Scene.h"
#include "Profiler.h"
#include "LoggingFunctions.h"
#include "Application.h"
#include "UiAPI.h"
#include "UiMainWindow.h"
#include "AttributeMetadata.h"

#include <Ogre.h>

#include <QDir>
#include <QDateTime>

#include "MemoryLeakCheck.h"

using namespace OgreRenderer;

EC_Camera::EC_Camera(Scene* scene) :
    IComponent(scene),
    upVector(this, "Up vector", float3::unitY),
    nearPlane(this, "Near plane", 0.1f),
    farPlane(this, "Far plane", 2000.f),
    verticalFov(this, "Vertical FOV", 45.f),
    aspectRatio(this, "Aspect ratio", ""),
    attached_(false),
    camera_(0),
    query_(0),
    queryFrameNumber_(-1)
{
    static AttributeMetadata minZero;
    static bool metadataInitialized = false;
    if (!metadataInitialized)
    {
        minZero.minimum = "0.0";
        metadataInitialized = true;
    }
    nearPlane.SetMetadata(&minZero);

    if (scene)
        world_ = scene->GetWorld<OgreWorld>();
    connect(this, SIGNAL(ParentEntitySet()), SLOT(UpdateSignals()));
    if (framework)
        connect(framework->Frame(), SIGNAL(Updated(float)), SLOT(OnUpdated(float)));
    connect(this, SIGNAL(AttributeChanged(IAttribute*, AttributeChange::Type)), SLOT(OnAttributeUpdated(IAttribute*)));
}
{'fraction_non_alphanumeric': 0.14410876132930514, 'fraction_numerical': 0.008459214501510574, 'mean_word_length': 5.00907441016334, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '6877114', 'n_tokens_mistral': 1119, 'n_tokens_neox': 1109, 'n_words': 244}