<commit_before>#include "precompiled.hpp"
#include "model/Uniforms.hpp"
#include "util/Logging.hpp"

#include <QtCore/QEvent>
#include <QtGui/QMouseEvent>
#include <QtGui/QResizeEvent>
#include <QtGui/QWheelEvent>

#include "util/ArcBall.hpp"
#include "util/TypeInfo.hpp"
#include "util/Util.hpp"

// TODO Should implement  Qtilities::Core::Interfaces::IModificationNotifier
namespace balls {

constexpr float ZOOM_INTERVAL = 1.0f;

using balls::util::types::info;
using balls::util::resolveGLType;
using balls::util::types::UniformInfo;
using balls::util::types::UniformCollection;

Uniforms::Uniforms(QObject* parent) noexcept
  : QObject(parent),
    _meta(metaObject()),
    _view(glm::translate(vec3(0, 0, -8))),
    _canvasSize(1, 1),
    _lastCanvasSize(1, 1),
    _farPlane(100),
    _nearPlane(.01f),
    _trackball(vec3(0, 0, 0), .8) {
  setFov(glm::radians(45.0f));
  _elapsedTime.start();
}

void Uniforms::receiveUniforms(const UniformCollection& uniforms) noexcept {
  // We must consider three cases:
  // 1: Uniforms that were removed (old - new)
  // 2: Uniforms that were added (new - old)
  // 3: Uniforms we still have (new & old)

  using balls::util::types::info;
  using balls::util::resolveGLType;
  using balls::util::types::UniformInfo;
  using balls::util::types::UniformCollection;
  using std::set_difference;
  using std::set_intersection;

  UniformCollection temp;

  auto cb = _uniformList.cbegin();
  auto ce = _uniformList.cend();
  // It's okay to cache these iterators, as we're not modifying _uniformList

  // First handle discarded uniforms (old - new)
  set_difference(
    cb,
    ce,
    uniforms.cbegin(),
    uniforms.cend(),
    std::inserter(temp, temp.begin()));<commit_msg>Rearrange more member initializers<commit_after>#include "precompiled.hpp"
#include "model/Uniforms.hpp"
#include "util/Logging.hpp"

#include <QtCore/QEvent>
#include <QtGui/QMouseEvent>
#include <QtGui/QResizeEvent>
#include <QtGui/QWheelEvent>

#include "util/ArcBall.hpp"
#include "util/TypeInfo.hpp"
#include "util/Util.hpp"

// TODO Should implement  Qtilities::Core::Interfaces::IModificationNotifier
namespace balls {

constexpr float ZOOM_INTERVAL = 1.0f;

using balls::util::types::info;
using balls::util::resolveGLType;
using balls::util::types::UniformInfo;
using balls::util::types::UniformCollection;

Uniforms::Uniforms(QObject* parent) noexcept
  : QObject(parent),
    _meta(metaObject()),
    _view(glm::translate(vec3(0, 0, -8))),
    _trackball(vec3(0, 0, 0), .8),
    _canvasSize(1, 1),
    _lastCanvasSize(1, 1),
    _farPlane(100),
    _nearPlane(.01f) {
  setFov(glm::radians(45.0f));
  _elapsedTime.start();
}

void Uniforms::receiveUniforms(const UniformCollection& uniforms) noexcept {
  // We must consider three cases:
  // 1: Uniforms that were removed (old - new)
  // 2: Uniforms that were added (new - old)
  // 3: Uniforms we still have (new & old)

  using balls::util::types::info;
  using balls::util::resolveGLType;
  using balls::util::types::UniformInfo;
  using balls::util::types::UniformCollection;
  using std::set_difference;
  using std::set_intersection;

  UniformCollection temp;

  auto cb = _uniformList.cbegin();
  auto ce = _uniformList.cend();
  // It's okay to cache these iterators, as we're not modifying _uniformList

  // First handle discarded uniforms (old - new)
  set_difference(
    cb,
    ce,
    uniforms.cbegin(),
    uniforms.cend(),
    std::inserter(temp, temp.begin()));
{'fraction_non_alphanumeric': 0.1443001443001443, 'fraction_numerical': 0.015007215007215007, 'mean_word_length': 4.894557823129252, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '6166185', 'n_tokens_mistral': 1245, 'n_tokens_neox': 1174, 'n_words': 268}