~cmiller/ubuntu/trusty/icewm/translations-cause-crash-lp447883

« back to all changes in this revision

Viewing changes to src/yarray.h

  • Committer: Bazaar Package Importer
  • Author(s): Eduard Bloch
  • Date: 2009-01-26 00:18:14 UTC
  • mfrom: (1.3.1 upstream) (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090126001814-ea5ceoy4uroruz72
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    virtual void remove(const SizeType index);
39
39
    virtual void clear();
40
40
 
41
 
    const SizeType getCapacity() const { return fCapacity; }
42
 
    const SizeType getCount() const { return fCount; }
 
41
    SizeType getCapacity() const { return fCapacity; }
 
42
    SizeType getCount() const { return fCount; }
43
43
    bool isEmpty() const { return 0 == getCount(); }
44
44
 
45
45
    void setCapacity(SizeType nCapacity);
59
59
 
60
60
    void release();
61
61
public:
62
 
    const SizeType getIndex(void const * ptr) const {
 
62
    SizeType getIndex(void const * ptr) const {
63
63
        PRECONDITION(ptr >= getBegin() && ptr < getEnd());
64
64
        return (ptr >= getBegin() && ptr < getEnd()
65
65
                ? ((StorageType *) ptr - fElements) / fElementSize : npos);
130
130
        return getItem(0);
131
131
    }
132
132
    
133
 
    virtual const SizeType find(const DataType &item) {
 
133
    virtual SizeType find(const DataType &item) {
134
134
        for (SizeType i = 0; i < getCount(); ++i)
135
135
            if (getItem(i) == item) return i;
136
136
 
201
201
    virtual void remove(const SizeType index);
202
202
    virtual void clear();
203
203
 
204
 
    virtual const SizeType find(const char *str);
 
204
    virtual SizeType find(const char *str);
205
205
    
206
206
    char *const *getCArray() const;
207
207
    char **release();