<commit_before>// Copyright (C) 2016 <NAME>
// This file is part of the Ouzel engine.

#define NOMINMAX
#include <windows.h>
#include "WindowWin.h"
#include "core/Engine.h"
#include "utils/Utils.h"

void ouzelMain(const std::vector<std::string>& args);

int WINAPI WinMain(HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpCmdLine,
    int nCmdShow)
{
    OUZEL_UNUSED(hInstance);
    OUZEL_UNUSED(hPrevInstance);
    OUZEL_UNUSED(lpCmdLine);
    OUZEL_UNUSED(nCmdShow);

    LPWSTR* argList;
    int nArgs;
    int i;

    argList = CommandLineToArgvW(GetCommandLineW(), &nArgs);

    std::vector<std::string> args;

    if (argList)
    {
        for (i = 0; i < nArgs; i++)
        {
            char temporaryCString[256];
            WideCharToMultiByte(CP_UTF8, 0, argList[i], -1, temporaryCString, sizeof(temporaryCString), nullptr, nullptr);

            args.push_back(temporaryCString);
        }

        LocalFree(argList);
    }

    ouzel::setArgs(args);
    ouzelMain(ouzel::getArgs());

    if (!ouzel::sharedEngine)
    {
        return 0;
    }

    std::shared_ptr<ouzel::WindowWin> window = std::static_pointer_cast<ouzel::WindowWin>(ouzel::sharedEngine->getWindow());
    ouzel::sharedEngine->begin();

    MSG msg;

    bool running = true;

    while (running)
    {
        std::set<HACCEL> accelerators = window->getAccelerators();

        while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
        {
            bool translate = true;

            for (HACCEL accelerator : accelerators)
            {
                if (TranslateAccelerator(window->getNativeWindow(), accelerator, &msg))
                {
                    translate = false;
                }
            }

            if (translate)
            {
                TranslateMessage(&msg);
                DispatchMessage(&msg);
            }

            if (msg.message == WM_QUIT)
            {
                running = false;
            }
        }

        if (!ouzel::sharedEngine->run())
        {
            running = false;
        }
    }

    ouzel::sharedEngine->end();

    return 0;
}
<commit_msg>Use nullptr instead of NULL<commit_after>// Copyright (C) 2016 <NAME>
// This file is part of the Ouzel engine.

#define NOMINMAX
#include <windows.h>
#include "WindowWin.h"
#include "core/Engine.h"
#include "utils/Utils.h"

void ouzelMain(const std::vector<std::string>& args);

int WINAPI WinMain(HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpCmdLine,
    int nCmdShow)
{
    OUZEL_UNUSED(hInstance);
    OUZEL_UNUSED(hPrevInstance);
    OUZEL_UNUSED(lpCmdLine);
    OUZEL_UNUSED(nCmdShow);

    LPWSTR* argList;
    int nArgs;
    int i;

    argList = CommandLineToArgvW(GetCommandLineW(), &nArgs);

    std::vector<std::string> args;

    if (argList)
    {
        for (i = 0; i < nArgs; i++)
        {
            char temporaryCString[256];
            WideCharToMultiByte(CP_UTF8, 0, argList[i], -1, temporaryCString, sizeof(temporaryCString), nullptr, nullptr);

            args.push_back(temporaryCString);
        }

        LocalFree(argList);
    }

    ouzel::setArgs(args);
    ouzelMain(ouzel::getArgs());

    if (!ouzel::sharedEngine)
    {
        return 0;
    }

    std::shared_ptr<ouzel::WindowWin> window = std::static_pointer_cast<ouzel::WindowWin>(ouzel::sharedEngine->getWindow());
    ouzel::sharedEngine->begin();

    MSG msg;

    bool running = true;

    while (running)
    {
        std::set<HACCEL> accelerators = window->getAccelerators();

        while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE))
        {
            bool translate = true;

            for (HACCEL accelerator : accelerators)
            {
                if (TranslateAccelerator(window->getNativeWindow(), accelerator, &msg))
                {
                    translate = false;
                }
            }

            if (translate)
            {
                TranslateMessage(&msg);
                DispatchMessage(&msg);
            }

            if (msg.message == WM_QUIT)
            {
                running = false;
            }
        }

        if (!ouzel::sharedEngine->run())
        {
            running = false;
        }
    }

    ouzel::sharedEngine->end();

    return 0;
}

{'fraction_non_alphanumeric': 0.12156770711100681, 'fraction_numerical': 0.0070406007979347575, 'mean_word_length': 2.0334519572953735, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 29, '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': '306295', 'n_tokens_mistral': 1399, 'n_tokens_neox': 1316, 'n_words': 258}