<commit_before><commit_msg>add function create_window_and_renderer<commit_after>#ifndef MINIASCAPE_SDL_CREATE_WINDOW_AND_RENDERER
#define MINIASCAPE_SDL_CREATE_WINDOW_AND_RENDERER
#include "Window.hpp"
#include "Renderer.hpp"
#include <utility>

namespace sdl
{


template<template<typename Tp_, typename Dp_>class T_window_ptr,
         template<typename Tp_, typename Dp_>class T_renderer_ptr>
std::pair<Window<T_window_ptr>, Renderer<T_renderer_ptr>>
CreateWindowAndRenderer(int width, int height, Uint32 window_flags = 0)
{
    Window<T_window_ptr>     window;
    Renderer<T_renderer_ptr> renderer;
    if(SDL_CreateWindowAndRenderer(width, height, window_flags,
                &(window.get()), &(renderer.get())) != 0)
        throw InitError(SDL_GetError());
    return std::make_pair(window, renderer);
}




} //sdl

#endif /* MINIASCAPE_SDL_CREATE_WINDOW_AND_RENDERER */
{'fraction_non_alphanumeric': 0.10442678774120318, 'fraction_numerical': 0.004540295119182747, 'mean_word_length': 5.890625, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '4369670', 'n_tokens_mistral': 318, 'n_tokens_neox': 305, 'n_words': 51}