diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/array.h | 3 | ||||
-rw-r--r-- | common/str.h | 11 |
2 files changed, 3 insertions, 11 deletions
diff --git a/common/array.h b/common/array.h index 2db0ed2a8b..491ed138a2 100644 --- a/common/array.h +++ b/common/array.h @@ -54,7 +54,8 @@ public: /** * Construct an array by copying data from a regular array. */ - Array(const T *data, int n) { + template<class T2> + Array(const T2 *data, int n) { _capacity = _size = n; _storage = new T[_capacity]; copy(data, data + _size, _storage); diff --git a/common/str.h b/common/str.h index 5792692030..9c5e267f1c 100644 --- a/common/str.h +++ b/common/str.h @@ -314,16 +314,7 @@ Common::String normalizePath(const Common::String &path, const char sep); bool matchString(const char *str, const char *pat, bool pathMode = false); -class StringList : public Array<String> { -public: - void push_back(const char *str) { - Array<String>::push_back(str); - } - - void push_back(const String &str) { - Array<String>::push_back(str); - } -}; +typedef Array<String> StringList; } // End of namespace Common |