Commit a91ac216 authored by paroga@webkit.org's avatar paroga@webkit.org

2010-11-22 Patrick Gansterer <paroga@webkit.org>

        Reviewed by Sam Weinig.

        Add WTF::FixedArray::size()
        https://bugs.webkit.org/show_bug.cgi?id=49891

        Add a method to get the size of a FixedArray.

        * wtf/FixedArray.h:
        (WTF::FixedArray::size):
2010-11-22  Patrick Gansterer  <paroga@webkit.org>

        Reviewed by Sam Weinig.

        Use WTF::FixedArray::size()
        https://bugs.webkit.org/show_bug.cgi?id=49891

        * dom/Document.cpp:
        (WebCore::Document::~Document):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e578ecd0
2010-11-22 Patrick Gansterer <paroga@webkit.org>
Reviewed by Sam Weinig.
Add WTF::FixedArray::size()
https://bugs.webkit.org/show_bug.cgi?id=49891
Add a method to get the size of a FixedArray.
* wtf/FixedArray.h:
(WTF::FixedArray::size):
2010-11-22 Patrick Gansterer <paroga@webkit.org>
Reviewed by Adam Roben.
......
......@@ -29,7 +29,8 @@
#include <wtf/Assertions.h>
namespace WTF {
template <typename T, int Size> class FixedArray {
template <typename T, size_t Size> class FixedArray {
public:
T& operator[](size_t i)
{
......@@ -44,10 +45,14 @@ public:
}
T* data() { return m_data; }
size_t size() const { return Size; }
private:
T m_data[Size];
};
}
} // namespace WTF
using WTF::FixedArray;
#endif // FixedArray_h
2010-11-22 Patrick Gansterer <paroga@webkit.org>
Reviewed by Sam Weinig.
Use WTF::FixedArray::size()
https://bugs.webkit.org/show_bug.cgi?id=49891
* dom/Document.cpp:
(WebCore::Document::~Document):
2010-11-22 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Tony Chang.
......@@ -570,9 +570,8 @@ Document::~Document()
clearAXObjectCache();
m_decoder = 0;
unsigned count = sizeof(m_nameCollectionInfo) / sizeof(m_nameCollectionInfo[0]);
for (unsigned i = 0; i < count; i++)
for (size_t i = 0; i < m_nameCollectionInfo.size(); ++i)
deleteAllValues(m_nameCollectionInfo[i]);
if (m_styleSheets)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment