| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 ~WebVector() | 66 ~WebVector() |
| 67 { | 67 { |
| 68 destroy(); | 68 destroy(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 explicit WebVector(size_t size = 0) | 71 explicit WebVector(size_t size = 0) |
| 72 { | 72 { |
| 73 initialize(size); | 73 initialize(size); |
| 74 } | 74 } |
| 75 | 75 |
| 76 template <typename U> |
| 77 WebVector(const U* values, size_t size) |
| 78 { |
| 79 initializeFrom(values, size); |
| 80 } |
| 81 |
| 76 WebVector(const WebVector<T>& other) | 82 WebVector(const WebVector<T>& other) |
| 77 { | 83 { |
| 78 initializeFrom(other.m_ptr, other.m_size); | 84 initializeFrom(other.m_ptr, other.m_size); |
| 79 } | 85 } |
| 80 | 86 |
| 81 template <typename C> | 87 template <typename C> |
| 82 WebVector(const C& other) | 88 WebVector(const C& other) |
| 83 { | 89 { |
| 84 initializeFrom(other.size() ? &other[0] : 0, other.size()); | 90 initializeFrom(other.size() ? &other[0] : 0, other.size()); |
| 85 } | 91 } |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 ::operator delete(m_ptr); | 183 ::operator delete(m_ptr); |
| 178 } | 184 } |
| 179 | 185 |
| 180 T* m_ptr; | 186 T* m_ptr; |
| 181 size_t m_size; | 187 size_t m_size; |
| 182 }; | 188 }; |
| 183 | 189 |
| 184 } // namespace WebKit | 190 } // namespace WebKit |
| 185 | 191 |
| 186 #endif | 192 #endif |
| OLD | NEW |