<commit_before>/****************************************************************
* Copyright (C) 2016 <NAME>, <NAME>
*
* The content of this file may not be copied and/or distributed
* without the expressed permission of the copyright owner.
*
****************************************************************/

#pragma once

#include "mocca/base/Error.h"

#include <cstring>
#include <memory>
#include <string>
#include <tuple>

namespace mocca {

class ByteArray {
public:
    ByteArray(uint32_t capacity = 256);
    ByteArray(const ByteArray& other) = delete;
    ByteArray(ByteArray&& other);

    friend void swap(ByteArray& lhs, ByteArray& rhs);

    ByteArray& operator=(ByteArray other);

    ByteArray clone() const;

    unsigned char* data();
    const unsigned char* data() const;

    uint32_t capacity() const;
<commit_msg>explicit ctor for ByteArray to prevent side effects<commit_after>/****************************************************************
* Copyright (C) 2016 <NAME>, <NAME>
*
* The content of this file may not be copied and/or distributed
* without the expressed permission of the copyright owner.
*
****************************************************************/

#pragma once

#include "mocca/base/Error.h"

#include <cstring>
#include <memory>
#include <string>
#include <tuple>

namespace mocca {

class ByteArray {
public:
    explicit ByteArray(uint32_t capacity = 256);
    ByteArray(const ByteArray& other) = delete;
    ByteArray(ByteArray&& other);

    friend void swap(ByteArray& lhs, ByteArray& rhs);

    ByteArray& operator=(ByteArray other);

    ByteArray clone() const;

    unsigned char* data();
    const unsigned char* data() const;

    uint32_t capacity() const;

{'fraction_non_alphanumeric': 0.24200116346713205, 'fraction_numerical': 0.012798138452588714, 'mean_word_length': 5.07773851590106, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '1992603', 'n_tokens_mistral': 488, 'n_tokens_neox': 448, 'n_words': 156}