Switch to unified view
a/src/utils/smallut.h | b/src/utils/smallut.h | ||
---|---|---|---|
... |
... |
||
223 | operator std::map<T, U>() |
223 | operator std::map<T, U>() |
224 | { |
224 | { |
225 | return m_map; |
225 | return m_map; |
226 | } |
226 | } |
227 | }; |
227 | }; |
228 | template <typename T> |
||
229 | class create_vector |
||
230 | { |
||
231 | private: |
||
232 | std::vector<T> m_vector; |
||
233 | public: |
||
234 | create_vector(const T& val) |
||
235 | { |
||
236 | m_vector.push_back(val); |
||
237 | } |
||
238 | |||
239 | create_vector<T>& operator()(const T& val) |
||
240 | { |
||
241 | m_vector.push_back(val); |
||
242 | return *this; |
||
243 | } |
||
244 | |||
245 | operator std::vector<T>() |
||
246 | { |
||
247 | return m_vector; |
||
248 | } |
||
249 | }; |
||
228 | 250 | ||
229 | #ifndef MIN |
251 | #ifndef MIN |
230 | #define MIN(A,B) (((A)<(B)) ? (A) : (B)) |
252 | #define MIN(A,B) (((A)<(B)) ? (A) : (B)) |
231 | #endif |
253 | #endif |
232 | #ifndef MAX |
254 | #ifndef MAX |