@@ -47,7 +47,7 @@ class KeyedVector
47
47
48
48
inline void clear () { mVector .clear (); }
49
49
50
- /* !
50
+ /* !
51
51
* vector stats
52
52
*/
53
53
@@ -63,14 +63,14 @@ class KeyedVector
63
63
// returns true if the arguments is known to be identical to this vector
64
64
inline bool isIdenticalTo (const KeyedVector& rhs) const ;
65
65
66
- /* !
66
+ /* !
67
67
* accessors
68
68
*/
69
- const VALUE& valueFor (const KEY& key) const ;
70
- const VALUE& valueAt (size_t index) const ;
71
- const KEY& keyAt (size_t index) const ;
72
- ssize_t indexOfKey (const KEY& key) const ;
73
- const VALUE& operator [] (size_t index) const ;
69
+ const VALUE& valueFor (const KEY& key) const ;
70
+ const VALUE& valueAt (size_t index) const ;
71
+ const KEY& keyAt (size_t index) const ;
72
+ ssize_t indexOfKey (const KEY& key) const ;
73
+ const VALUE& operator [](size_t index) const ;
74
74
75
75
/* !
76
76
* modifying the array
@@ -79,10 +79,10 @@ class KeyedVector
79
79
VALUE& editValueFor (const KEY& key);
80
80
VALUE& editValueAt (size_t index);
81
81
82
- /* !
82
+ /* !
83
83
* add/insert/replace items
84
84
*/
85
-
85
+
86
86
ssize_t add (const KEY& key, const VALUE& item);
87
87
ssize_t replaceValueFor (const KEY& key, const VALUE& item);
88
88
ssize_t replaceValueAt (size_t index, const VALUE& item);
@@ -93,7 +93,7 @@ class KeyedVector
93
93
94
94
ssize_t removeItem (const KEY& key);
95
95
ssize_t removeItemsAt (size_t index, size_t count = 1 );
96
-
96
+
97
97
private:
98
98
SortedVector< key_value_pair_t <KEY, VALUE> > mVector ;
99
99
};
@@ -208,7 +208,7 @@ DefaultKeyedVector<KEY,VALUE>::DefaultKeyedVector(const VALUE& defValue)
208
208
template <typename KEY, typename VALUE> inline
209
209
const VALUE& DefaultKeyedVector<KEY,VALUE>::valueFor(const KEY& key) const {
210
210
ssize_t i = this ->indexOfKey (key);
211
- return i >= 0 ? KeyedVector<KEY,VALUE>::valueAt (i ) : mDefault ;
211
+ return i >= 0 ? KeyedVector<KEY, VALUE>::valueAt (static_cast < size_t >(i) ) : mDefault ;
212
212
}
213
213
214
214
} // namespace android
0 commit comments