<commit_before>#include "Reporter.hpp"

namespace fast {

// Initialize report methods for each type
std::map<Reporter::Type, Reporter::Method> Reporter::mGlobalReporterMethods =
#ifdef FAST_DEBUG
{
        {INFO, COUT},
        {WARNING, COUT},
        {ERROR, COUT}
};
#else
{
        {INFO, NONE},
        {WARNING, COUT},
        {ERROR, COUT}
};
#endif
#ifdef WIN32
WORD Reporter::m_defaultAttributes = 0;
#endif

Reporter::Reporter(Type type) {
    mType = type;
    mFirst = true;
#ifdef WIN32
    if(m_defaultAttributes == 0) {
        CONSOLE_SCREEN_BUFFER_INFO Info;
        GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &Info);
        m_defaultAttributes = Info.wAttributes;
    }
#endif
}

Reporter::Reporter() {
    Reporter::Reporter(INFO);
}

void Reporter::setType(Type type) {
    mType = type;
}

Reporter Reporter::info() {
    return Reporter(INFO);
}

Reporter Reporter::warning() {
    return Reporter(WARNING);
}<commit_msg>fix compile error gcc for Reporter constructor<commit_after>#include "Reporter.hpp"

namespace fast {

// Initialize report methods for each type
std::map<Reporter::Type, Reporter::Method> Reporter::mGlobalReporterMethods =
#ifdef FAST_DEBUG
{
        {INFO, COUT},
        {WARNING, COUT},
        {ERROR, COUT}
};
#else
{
        {INFO, NONE},
        {WARNING, COUT},
        {ERROR, COUT}
};
#endif
#ifdef WIN32
WORD Reporter::m_defaultAttributes = 0;
#endif

Reporter::Reporter(Type type) {
    mType = type;
    mFirst = true;
#ifdef WIN32
    if(m_defaultAttributes == 0) {
        CONSOLE_SCREEN_BUFFER_INFO Info;
        GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &Info);
        m_defaultAttributes = Info.wAttributes;
    }
#endif
}

Reporter::Reporter() {
    mType = INFO;
    mFirst = true;
#ifdef WIN32
    if(m_defaultAttributes == 0) {
        CONSOLE_SCREEN_BUFFER_INFO Info;
        GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &Info);
        m_defaultAttributes = Info.wAttributes;
    }
#endif
}

void Reporter::setType(Type type) {
    mType = type;
}

Reporter Reporter::info() {
    return Reporter(INFO);
}

Reporter Reporter::warning() {
    return Reporter(WARNING);
}
{'fraction_non_alphanumeric': 0.1223744292237443, 'fraction_numerical': 0.00684931506849315, 'mean_word_length': 3.6029411764705883, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2610097', 'n_tokens_mistral': 744, 'n_tokens_neox': 714, 'n_words': 154}