<commit_before>
#include "slg/Window.hpp"

#include <GL/glew.h>
#include <GL/glfw.h>

namespace slg {
  
  Window::Window(int width, int height)
  {
    glfwInit();
    glfwOpenWindow(width, height, 8, 8, 8, 8, 24, 0, GLFW_WINDOW);
    glewInit();
  }
  
  Window::~Window()
  {
    glfwTerminate();
  }
  
  void Window::run()
  {
    glfwSetTime(0.0);<commit_msg>Only allow one active window.<commit_after>
#include "slg/Window.hpp"

#include <GL/glew.h>
#include <GL/glfw.h>
#include <cassert>

namespace slg {
  
  static Window * currentWindow = 0;
  
  Window::Window(int width, int height)
  {
    assert(!currentWindow && "We may only have one window active at all times");
    currentWindow = this;
    
    glfwInit();
    glfwOpenWindow(width, height, 8, 8, 8, 8, 24, 0, GLFW_WINDOW);
    glewInit();
  }
  
  Window::~Window()
  {
    currentWindow = 0;
    glfwTerminate();
  }
  
  void Window::run()
  {
    glfwSetTime(0.0);
{'fraction_non_alphanumeric': 0.15212765957446808, 'fraction_numerical': 0.02127659574468085, 'mean_word_length': 3.091304347826087, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '295360', 'n_tokens_mistral': 381, 'n_tokens_neox': 366, 'n_words': 82}