<commit_before>#pragma once
//------------------------------------------------------------------------------
/**
    @class Oryol::_priv::glVertexAttr
    @brief private: hold GL specific vertex attr values
*/
#include "Core/Types.h"
#include "Gfx/gl/gl_decl.h"
#include <cstring>

namespace Oryol {
namespace _priv {
    
class glVertexAttr {
public:
    /// constructor
    glVertexAttr() :
        index(0),
        enabled(0),
        vbIndex(0),
        divisor(0),
        stride(0),
        size(0),
        normalized(0),
        offset(0),
        type(0) {
        // empty
    };
    /// test for equality
    bool operator==(const glVertexAttr& rhs) const {
        return 0 == std::memcmp(this, &rhs, sizeof(glVertexAttr));
    };
    /// test for inequality
    bool operator!=(const glVertexAttr& rhs) const {
        return 0 != std::memcmp(this, &rhs, sizeof(glVertexAttr));
    };

    uint8 index;
    uint8 enabled;
    uint8 vbIndex;
    uint8 divisor;
    uint8 stride;
    uint8 size;
    uint8 normalized;
    uint32 offset;
    GLenum type;
};

} // namespace _priv
} // namespace Oryol<commit_msg>Fixed valgrind warning in glVertexAttr (memcmp over uninitialized padding bytes)<commit_after>#pragma once
//------------------------------------------------------------------------------
/**
    @class Oryol::_priv::glVertexAttr
    @brief private: hold GL specific vertex attr values
*/
#include "Core/Types.h"
#include "Gfx/gl/gl_decl.h"
#include <cstring>

namespace Oryol {
namespace _priv {
    
class glVertexAttr {
public:
    /// constructor
    glVertexAttr() :
        index(0),
        enabled(0),
        vbIndex(0),
        divisor(0),
        stride(0),
        size(0),
        normalized(0),
        offset(0),
        type(0) {
        // empty
    };
    /// test for equality
    bool operator==(const glVertexAttr& rhs) const {
        return (this->index == rhs.index) &&
               (this->enabled == rhs.enabled) &&
               (this->vbIndex == rhs.vbIndex) &&
               (this->divisor == rhs.divisor) &&
               (this->stride == rhs.stride) &&
               (this->size == rhs.size) &&
               (this->normalized == rhs.normalized) &&
               (this->offset == rhs.offset) &&
               (this->type == rhs.type);
    };
    /// test for inequality
    bool operator!=(const glVertexAttr& rhs) const {
        return !operator==(rhs);
    };

    uint8 index;
    uint8 enabled;
    uint8 vbIndex;
    uint8 divisor;
    uint8 stride;
    uint8 size;
    uint8 normalized;
    uint32 offset;
    GLenum type;
};

} // namespace _priv
} // namespace Oryol
{'fraction_non_alphanumeric': 0.18657565415244595, 'fraction_numerical': 0.01441031475161168, 'mean_word_length': 1.7422037422037422, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, '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': '345394', 'n_tokens_mistral': 781, 'n_tokens_neox': 775, 'n_words': 189}