<commit_before>namespace grndr {

void Renderer::set_pipeline(const PipelineSpec& spec)
{
  for (uint32_t i=0; i < this->spec.attributes.size(); ++i) {
    glDisableVertexAttribArray(i);
  }
  this->spec = spec;
  if (this->spec.compiled == false) {
    assert(this->spec.compile_shader());
  }
  this->spec.shader.glsl.use();
  for (uint32_t i=0; i < this->spec.attributes.size(); ++i) {
    glEnableVertexAttribArray(i);
  }
}

void Renderer::set_uniform_matrix4(const PipelineSpec::Shader::Uniform& u, const GLfloat* elements)
{
  this->spec.shader.glsl.uniform_mat4(u.location, 1, elements);
}

void Renderer::set_vbo(uint8_t idx, ogl::VBO vbo)
{
  size_t size = idx+1;
  if (size > this->vbo_list.capacity()) { this->vbo_list.reserve(size); }
  this->vbo_list[idx] = vbo;
}
<commit_msg>Fix change const value<commit_after>namespace grndr {

void Renderer::set_pipeline(const PipelineSpec& spec)
{
  for (uint32_t i=0; i < this->spec.attributes.size(); ++i) {
    glDisableVertexAttribArray(i);
  }

  this->spec = spec;
  assert(this->spec.compiled);

  this->spec.shader.glsl.use();
  for (uint32_t i=0; i < this->spec.attributes.size(); ++i) {
    glEnableVertexAttribArray(i);
  }
}

void Renderer::set_uniform_matrix4(const PipelineSpec::Shader::Uniform& u, const GLfloat* elements)
{
  this->spec.shader.glsl.uniform_mat4(u.location, 1, elements);
}

void Renderer::set_vbo(uint8_t idx, ogl::VBO vbo)
{
  size_t size = idx+1;
  if (size > this->vbo_list.capacity()) { this->vbo_list.reserve(size); }
  this->vbo_list[idx] = vbo;
}

{'fraction_non_alphanumeric': 0.16937053861129137, 'fraction_numerical': 0.01427644386761843, 'mean_word_length': 4.796992481203008, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 24, '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': '5784677', 'n_tokens_mistral': 604, 'n_tokens_neox': 604, 'n_words': 102}