diff options
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h b/src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h index 96e9cc2..f5f5ded 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/ByteArray.h @@ -45,6 +45,13 @@ namespace WTF { m_data[index] = static_cast<unsigned char>(value + 0.5); } + void set(unsigned index, unsigned char value) + { + if (index >= m_size) + return; + m_data[index] = value; + } + bool get(unsigned index, unsigned char& result) const { if (index >= m_size) @@ -53,6 +60,12 @@ namespace WTF { return true; } + unsigned char get(unsigned index) const + { + ASSERT(index < m_size); + return m_data[index]; + } + unsigned char* data() { return m_data; } void deref() |