| OLD | NEW |
| 1 | 1 |
| 2 //---------------------------------------------------------------------------- | 2 //---------------------------------------------------------------------------- |
| 3 // Anti-Grain Geometry - Version 2.3 | 3 // Anti-Grain Geometry - Version 2.3 |
| 4 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) | 4 // Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com) |
| 5 // | 5 // |
| 6 // Permission to copy, use, modify, sell and distribute this software | 6 // Permission to copy, use, modify, sell and distribute this software |
| 7 // is granted provided this copyright notice appears in all copies. | 7 // is granted provided this copyright notice appears in all copies. |
| 8 // This software is provided "as is" without express or implied | 8 // This software is provided "as is" without express or implied |
| 9 // warranty, and with no claim as to its suitability for any purpose. | 9 // warranty, and with no claim as to its suitability for any purpose. |
| 10 // | 10 // |
| 11 //---------------------------------------------------------------------------- | 11 //---------------------------------------------------------------------------- |
| 12 // Contact: mcseem@antigrain.com | 12 // Contact: mcseem@antigrain.com |
| 13 // mcseemagg@yahoo.com | 13 // mcseemagg@yahoo.com |
| 14 // http://www.antigrain.com | 14 // http://www.antigrain.com |
| 15 //---------------------------------------------------------------------------- | 15 //---------------------------------------------------------------------------- |
| 16 #ifndef AGG_ARRAY_INCLUDED | 16 #ifndef AGG_ARRAY_INCLUDED |
| 17 #define AGG_ARRAY_INCLUDED | 17 #define AGG_ARRAY_INCLUDED |
| 18 |
| 18 #include "agg_basics.h" | 19 #include "agg_basics.h" |
| 20 #include "core/include/fxcrt/fx_memory.h" // For FXSYS_* macros. |
| 21 |
| 19 namespace agg | 22 namespace agg |
| 20 { | 23 { |
| 21 template<class T> class pod_array | 24 template <class T> |
| 22 { | 25 class pod_array { |
| 23 public: | 26 public: |
| 24 typedef T value_type; | 27 typedef T value_type; |
| 25 ~pod_array() | 28 ~pod_array() |
| 26 { | 29 { |
| 27 FX_Free(m_array); | 30 FX_Free(m_array); |
| 28 } | 31 } |
| 29 pod_array() : m_size(0), m_capacity(0), m_array(0) {} | 32 pod_array() : m_size(0), m_capacity(0), m_array(0) {} |
| 30 pod_array(unsigned cap, unsigned extra_tail = 0); | 33 pod_array(unsigned cap, unsigned extra_tail = 0); |
| 31 pod_array(const pod_array<T>&); | 34 pod_array(const pod_array<T>&); |
| 32 const pod_array<T>& operator = (const pod_array<T>&); | 35 const pod_array<T>& operator = (const pod_array<T>&); |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 quick_sort_threshold = 9 | 500 quick_sort_threshold = 9 |
| 498 }; | 501 }; |
| 499 template<class T> inline void swap_elements(T& a, T& b) | 502 template<class T> inline void swap_elements(T& a, T& b) |
| 500 { | 503 { |
| 501 T temp = a; | 504 T temp = a; |
| 502 a = b; | 505 a = b; |
| 503 b = temp; | 506 b = temp; |
| 504 } | 507 } |
| 505 } | 508 } |
| 506 #endif | 509 #endif |
| OLD | NEW |