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

#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <WinSock2.h>
#include <WS2tcpip.h>
#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <errno.h>
#include <poll.h>
#include <netdb.h>
#include <unistd.h>
#endif
#include "Network.hpp"
#include "Client.hpp"
#include "utils/Log.hpp"

namespace ouzel
{
    namespace network
    {
        Network::Network()
        {
#ifdef _WIN32
            WORD sockVersion = MAKEWORD(2, 2);
            WSADATA wsaData;
            int error = WSAStartup(sockVersion, &wsaData);
            if (error != 0)
                throw std::runtime_error("Failed to start WinSock failed, error: " + std::to_string(error));

            if (wsaData.wVersion != sockVersion)
            {
                throw std::runtime_error("Incorrect WinSock version");
                WSACleanup();
            }<commit_msg>Eliminate the unreachable code in the Network's constructor<commit_after>// Copyright (C) 2018 <NAME>
// This file is part of the Ouzel engine.

#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <WinSock2.h>
#include <WS2tcpip.h>
#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <errno.h>
#include <poll.h>
#include <netdb.h>
#include <unistd.h>
#endif
#include "Network.hpp"
#include "Client.hpp"
#include "utils/Log.hpp"

namespace ouzel
{
    namespace network
    {
        Network::Network()
        {
#ifdef _WIN32
            WORD sockVersion = MAKEWORD(2, 2);
            WSADATA wsaData;
            int error = WSAStartup(sockVersion, &wsaData);
            if (error != 0)
                throw std::runtime_error("Failed to start WinSock failed, error: " + std::to_string(error));

            if (wsaData.wVersion != sockVersion)
                throw std::runtime_error("Incorrect WinSock version");
{'fraction_non_alphanumeric': 0.1246040126715945, 'fraction_numerical': 0.013727560718057022, 'mean_word_length': 2.7524752475247523, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '3363331', 'n_tokens_mistral': 657, 'n_tokens_neox': 621, 'n_words': 166}