Lines 72-139
Link Here
|
72 |
return &*(vector < unsigned char >::begin()); |
72 |
return &*(vector < unsigned char >::begin()); |
73 |
} |
73 |
} |
74 |
|
74 |
|
75 |
void clear() |
75 |
/* clear function was broken, instead use STL's working std::vector<>::clear */ |
76 |
{ |
|
|
77 |
#if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) |
78 |
|
79 |
#if defined(__GLIBCPP_INTERNAL_VECTOR_H) |
80 |
|
81 |
_Destroy(_M_start, _M_finish); |
82 |
|
83 |
#else |
84 |
|
85 |
destroy(_M_start, _M_finish); |
86 |
|
87 |
#endif |
88 |
|
89 |
_M_deallocate(_M_start, _M_end_of_storage - _M_start); |
90 |
|
91 |
_M_start = _M_finish = _M_end_of_storage = 0; |
92 |
|
93 |
#else |
94 |
|
95 |
destroy(start, finish); |
96 |
|
97 |
deallocate(); |
98 |
|
99 |
start = finish = end_of_storage = 0; |
100 |
|
101 |
#endif |
102 |
} |
103 |
}; |
76 |
}; |
104 |
|
77 |
|
105 |
class T_messages : public vector < Message * > |
78 |
class T_messages : public vector < Message * > |
106 |
{ |
79 |
{ |
107 |
public: |
80 |
public: |
108 |
|
81 |
|
109 |
void clear() |
82 |
/* clear function was broken, instead use STL's working std::vector<>::clear */ |
110 |
{ |
|
|
111 |
#if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) |
112 |
|
113 |
#if defined(__GLIBCPP_INTERNAL_VECTOR_H) |
114 |
|
115 |
_Destroy(_M_start, _M_finish); |
116 |
|
117 |
#else |
118 |
|
119 |
destroy(_M_start, _M_finish); |
120 |
|
121 |
#endif |
122 |
|
123 |
_M_deallocate(_M_start, _M_end_of_storage - _M_start); |
124 |
|
125 |
_M_start = _M_finish = _M_end_of_storage = 0; |
126 |
|
127 |
#else |
128 |
|
129 |
destroy(start, finish); |
130 |
|
131 |
deallocate(); |
132 |
|
133 |
start = finish = end_of_storage = 0; |
134 |
|
135 |
#endif |
136 |
} |
137 |
}; |
83 |
}; |
138 |
|
84 |
|
139 |
struct T_less |
85 |
struct T_less |