<commit_before>#include "window.h"

namespace EPITOME
{
	GL_Window::GL_Window(int width, int height, char* title)
	{
		//Initialize GLFW
		if (!glfwInit())
		{
			//TODO: Improve error handling
			fprintf(stderr, "GLFW initialization failure.\n");
			return;
		}

		glfwWindowHint(GLFW_SAMPLES, 4);
		glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
		glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
		glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

		window = glfwCreateWindow(width, height, title, NULL, NULL);
		
		if (window == NULL)
		{
			//TODO: Improve error handling here as well
			fprintf(stderr, "GLFW window failed.\n");
			glfwTerminate();
			return;
		}
		glfwMakeContextCurrent(window);
	}

	GL_Window::GL_Window(const GL_Window& win)
	{
		window = win.get_window_handle();
	}

	GL_Window::~GL_Window()
	{
		glfwTerminate();
	}

	GLFWwindow* GL_Window::get_window_handle() const
	{<commit_msg>Made sure that the destruction of one window won't kill the rest<commit_after>#include "window.h"

namespace EPITOME
{
	GL_Window::GL_Window(int width, int height, char* title)
	{
		//Initialize GLFW
		if (!glfwInit())
		{
			//TODO: Improve error handling
			fprintf(stderr, "GLFW initialization failure.\n");
			return;
		}

		glfwWindowHint(GLFW_SAMPLES, 4);
		glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
		glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
		glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

		window = glfwCreateWindow(width, height, title, NULL, NULL);
		
		if (window == NULL)
		{
			//TODO: Improve error handling here as well
			fprintf(stderr, "GLFW window failed.\n");
			glfwTerminate();
			return;
		}
		glfwMakeContextCurrent(window);
	}

	GL_Window::GL_Window(const GL_Window& win)
	{
		window = win.get_window_handle();
	}

	GL_Window::~GL_Window()
	{
		glfwDestroyWindow(window);
	}

	GLFWwindow* GL_Window::get_window_handle() const
	{
{'fraction_non_alphanumeric': 0.12020997375328084, 'fraction_numerical': 0.0031496062992125984, 'mean_word_length': 4.706586826347305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5988090', 'n_tokens_mistral': 773, 'n_tokens_neox': 698, 'n_words': 139}