<commit_before>#include <glad/glad.h>
#include <map>
#include <imgui.h>

// Use stb_image.h to load a PNG from disk and turn it into raw RGBA pixel data:
#define STB_IMAGE_IMPLEMENTATION
#include <babylon/utils/stb_image.h>
#include <babylon/core/filesystem.h>


namespace ImGuiUtils
{

  struct ImageFileTexture
  {
    int _width, _height;
    GLuint _textureId;
    bool found = true;

    ImageFileTexture() = default;
    ImageFileTexture(const std::string &filename)
    {
      if (!BABYLON::Filesystem::exists(filename))
      {
        found = false;
        return;
      }

      unsigned char* my_image_data = stbi_load(filename.c_str(), &_width, &_height, NULL, 4);

      // Turn the RGBA pixel data into an OpenGL texture:
      glGenTextures(1, &_textureId);
      glBindTexture(GL_TEXTURE_2D, _textureId);
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
      glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
      glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, _width, _height, 0, GL_RGBA, GL_UNSIGNED_BYTE, my_image_data);
      stbi_image_free(my_image_data);
    }
    
    ~ImageFileTexture() = default;
  };

  using Filename = std::string;<commit_msg>imgui_utils.cpp: [clang-tidy warning] initialize fields<commit_after>#include <glad/glad.h>
#include <map>
#include <imgui.h>

// Use stb_image.h to load a PNG from disk and turn it into raw RGBA pixel data:
#define STB_IMAGE_IMPLEMENTATION
#include <babylon/utils/stb_image.h>
#include <babylon/core/filesystem.h>


namespace ImGuiUtils
{

  struct ImageFileTexture
  {
    int _width = 0, _height = 0;
    GLuint _textureId = 0;
    bool found = true;

    ImageFileTexture() = default;
    ImageFileTexture(const std::string &filename)
    {
      if (!BABYLON::Filesystem::exists(filename))
      {
        found = false;
        return;
      }

      unsigned char* my_image_data = stbi_load(filename.c_str(), &_width, &_height, NULL, 4);

      // Turn the RGBA pixel data into an OpenGL texture:
      glGenTextures(1, &_textureId);
      glBindTexture(GL_TEXTURE_2D, _textureId);
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
      glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
      glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, _width, _height, 0, GL_RGBA, GL_UNSIGNED_BYTE, my_image_data);
      stbi_image_free(my_image_data);
    }
    
    ~ImageFileTexture() = default;
  };

  using Filename = std::string;
{'fraction_non_alphanumeric': 0.10374414976599064, 'fraction_numerical': 0.008970358814352574, 'mean_word_length': 3.741219963031423, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '6063399', 'n_tokens_mistral': 954, 'n_tokens_neox': 909, 'n_words': 194}