<commit_before>/*
 * Copyright (c) 2016 <NAME>
 *
 * This file is part of the Realms Of Steel.
 * For conditions of distribution and use, see copyright details in the LICENSE file.
 */
#ifndef ROS_COMMON_H
#define ROS_COMMON_H

#include <cstddef>
#include <cstdlib>
#include <cstdio>
#include <cstdarg>
#include <cstring>
#include <cassert>

#define ROS_NOOP ((void)0)
#define ROS_NULL NULL

#ifndef ROS_DISABLE_ASSERTS
    #define ROS_ASSERT assert
#else
    #define ROS_ASSERT ROS_NOOP
#endif

namespace ros {

    template<class Type, size_t Size>
    inline Type* ArrayBegin(Type (&array)[Size]) {
        return &array[0];
    }

    template<class Type, size_t Size>
    inline Type* ArrayEnd(Type (&array)[Size]) {
        return &array[0] + Size;
    }

    const size_t KB = 1024;
    const size_t MB = 1024 * 1024;

    template<class Type>
    inline Type Alignment(const Type& value, size_t multiple) {
        return (multiple - (value % multiple)) % multiple;
    }

    template<class Type>
    inline Type Align(const Type& value, size_t multiple) {
        return value + alignment(value, multiple);
    }

}

#endif // ROS_COMMON_H

<commit_msg>Remove array utils from Common.h<commit_after>/*
 * Copyright (c) 2016 <NAME>
 *
 * This file is part of the Realms Of Steel.
 * For conditions of distribution and use, see copyright details in the LICENSE file.
 */
#ifndef ROS_COMMON_H
#define ROS_COMMON_H

#include <cstddef>
#include <cstdlib>
#include <cstdio>
#include <cstdarg>
#include <cstring>
#include <cassert>

#define ROS_NOOP ((void)0)
#define ROS_NULL NULL

#ifndef ROS_DISABLE_ASSERTS
    #define ROS_ASSERT assert
#else
    #define ROS_ASSERT ROS_NOOP
#endif

namespace ros {

    const size_t KB = 1024;
    const size_t MB = 1024 * 1024;

    template<class Type>
    inline Type Alignment(const Type& value, size_t multiple) {
        return (multiple - (value % multiple)) % multiple;
    }

    template<class Type>
    inline Type Align(const Type& value, size_t multiple) {
        return value + alignment(value, multiple);
    }

}

#endif // ROS_COMMON_H


{'fraction_non_alphanumeric': 0.10114503816793893, 'fraction_numerical': 0.01717557251908397, 'mean_word_length': 3.5, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, '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': '2239902', 'n_tokens_mistral': 742, 'n_tokens_neox': 679, 'n_words': 223}