<commit_before>#include <SDL.h>
#include <stdexcept>
#include <string>
#include <iostream>
#include "window.h"

/*
*  Lesson 7: Taking advantage of classes
*/
int main(int argc, char** argv){
    //Start our window
    try {
        Window::Init("Lesson 7");
    }
    catch (const std::runtime_error &e){
        std::cout << e.what() << std::endl;
    }

    //Load up an image
    SDL_Texture *img;
    try {
        std::string file = "../res/Lesson7/image.png";
        img = Window::LoadImage(file);
    }
    catch (const std::runtime_error &e){
        //Catch error and crash
        std::cout << e.what() << std::endl;
        Window::Quit();
        return -1;
    }
    //Set a position to draw it with
    SDL_Rect pos = { Window::Box().w / 2 - 100 / 2,
                     Window::Box().h / 2 - 100 / 2,
                     100, 100 };
    //The angle to draw at, so we can play with it
    int angle = 0;

    //Our event structure
	SDL_Event e;
	//For tracking if we want to quit
	bool quit = false;
	while (!quit){
		//Event Polling
		while (SDL_PollEvent(&e)){
			//If user closes he window
			if (e.type == SDL_QUIT)
				quit = true;
			//If user presses any key
			if (e.type == SDL_KEYDOWN){
				switch (e.key.keysym.sym){
                    //For rotating image
                    case SDLK_d:
                        angle += 2;
                        break;
                    case SDLK_a:
                        angle -= 2;
                        break;
					//For quitting, escape key
					case SDLK_ESCAPE:
						quit = true;
						break;
					default:
						break;
				}
			}
		}
        //RENDERING
        Window::Clear();
        //Draw our image with a 45 degree rotation
        Window::Draw(img, pos, NULL, angle);

        Window::Present();
	}
	
	return 0;
}<commit_msg>forgot to call Window::Quit() in L7<commit_after>#include <SDL.h>
#include <stdexcept>
#include <string>
#include <iostream>
#include "window.h"

/*
*  Lesson 7: Taking advantage of classes
*/
int main(int argc, char** argv){
    //Start our window
    try {
        Window::Init("Lesson 7");
    }
    catch (const std::runtime_error &e){
        std::cout << e.what() << std::endl;
    }

    //Load up an image
    SDL_Texture *img;
    try {
        std::string file = "../res/Lesson7/image.png";
        img = Window::LoadImage(file);
    }
    catch (const std::runtime_error &e){
        //Catch error and crash
        std::cout << e.what() << std::endl;
        Window::Quit();
        return -1;
    }
    //Set a position to draw it with
    SDL_Rect pos = { Window::Box().w / 2 - 100 / 2,
                     Window::Box().h / 2 - 100 / 2,
                     100, 100 };
    //The angle to draw at, so we can play with it
    int angle = 0;

    //Our event structure
	SDL_Event e;
	//For tracking if we want to quit
	bool quit = false;
	while (!quit){
		//Event Polling
		while (SDL_PollEvent(&e)){
			//If user closes he window
			if (e.type == SDL_QUIT)
				quit = true;
			//If user presses any key
			if (e.type == SDL_KEYDOWN){
				switch (e.key.keysym.sym){
                    //For rotating image
                    case SDLK_d:
                        angle += 2;
                        break;
                    case SDLK_a:
                        angle -= 2;
                        break;
					//For quitting, escape key
					case SDLK_ESCAPE:
						quit = true;
						break;
					default:
						break;
				}
			}
		}
        //RENDERING
        Window::Clear();
        //Draw our image with a 45 degree rotation
        Window::Draw(img, pos, NULL, angle);

        Window::Present();
	}
	Window::Quit();

	return 0;
}
{'fraction_non_alphanumeric': 0.13066012002182215, 'fraction_numerical': 0.014457174031642117, 'mean_word_length': 1.5661301609517144, 'pattern_counts': {'":': 0, '<': 27, '<?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': '2806817', 'n_tokens_mistral': 1336, 'n_tokens_neox': 1131, 'n_words': 356}