<commit_before>#pragma once

#ifdef __APPLE__
#include "TargetConditionals.h"
#endif

namespace Halley {
	enum class GamePlatform {
		Unknown,
		Windows,
		MacOS,
		Linux,
		Switch,
		XboxOne,
		PS4,
		UWP,
		Android,
		iOS,
        Emscripten
	};

	template <>
	struct EnumNames<GamePlatform> {
		constexpr std::array<const char*, 11> operator()() const {
			return {{
				"unknown",
				"windows",
				"macos",
				"linux",
				"switch",
				"xboxone",
				"ps4",
				"uwp",
				"android",
				"ios",
                "emscripten"
			}};
		}
	};

    constexpr inline GamePlatform getPlatform()
    {
    #if defined(__NX_TOOLCHAIN_MAJOR__)
        return GamePlatform::Switch;
    #elif defined(__ORBIS__)
        return GamePlatform::PS4;
    #elif defined(_XBOX_ONE)
        return GamePlatform::XboxOne;
    #elif defined(WINDOWS_STORE)
        return GamePlatform::UWP;
    #elif defined(_WIN32)
        return GamePlatform::Windows;
    #elif defined(__ANDROID__)
        return GamePlatform::Android;
    #elif defined(__EMSCRIPTEN__)
        return GamePlatform::Emscripten;
    #elif defined(__APPLE__)
        #if defined(TARGET_OS_IPHONE)
            return GamePlatform::iOS;
        #else
            return GamePlatform::Mac;
        #endif
    #elif defined(__linux)
        return GamePlatform::Linux;
    #else
        return GamePlatform::Unknown;
    #endif
    }
}
<commit_msg>Fix getPlatform erroneously identifying MacOS as iOS.<commit_after>#pragma once

#ifdef __APPLE__
#include "TargetConditionals.h"
#endif

namespace Halley {
	enum class GamePlatform {
		Unknown,
		Windows,
		MacOS,
		Linux,
		Switch,
		XboxOne,
		PS4,
		UWP,
		Android,
		iOS,
        Emscripten
	};

	template <>
	struct EnumNames<GamePlatform> {
		constexpr std::array<const char*, 11> operator()() const {
			return {{
				"unknown",
				"windows",
				"macos",
				"linux",
				"switch",
				"xboxone",
				"ps4",
				"uwp",
				"android",
				"ios",
                "emscripten"
			}};
		}
	};

    constexpr inline GamePlatform getPlatform()
    {
    #if defined(__NX_TOOLCHAIN_MAJOR__)
        return GamePlatform::Switch;
    #elif defined(__ORBIS__)
        return GamePlatform::PS4;
    #elif defined(_XBOX_ONE)
        return GamePlatform::XboxOne;
    #elif defined(WINDOWS_STORE)
        return GamePlatform::UWP;
    #elif defined(_WIN32)
        return GamePlatform::Windows;
    #elif defined(__ANDROID__)
        return GamePlatform::Android;
    #elif defined(__EMSCRIPTEN__)
        return GamePlatform::Emscripten;
    #elif defined(__APPLE__)
        #if TARGET_OS_IPHONE
            return GamePlatform::iOS;
        #else
            return GamePlatform::MacOS;
        #endif
    #elif defined(__linux)
        return GamePlatform::Linux;
    #else
        return GamePlatform::Unknown;
    #endif
    }
}

{'fraction_non_alphanumeric': 0.1071049840933192, 'fraction_numerical': 0.00494874513962531, 'mean_word_length': 2.6189258312020463, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3831171', 'n_tokens_mistral': 1020, 'n_tokens_neox': 903, 'n_words': 194}