]> git.sesse.net Git - vlc/blobdiff - include/vlc_arrays.h
Win32: handle file paths of arbitrary length (in file system code)
[vlc] / include / vlc_arrays.h
index b8dbae473ccc7f428c7f79a3ed9ff90fb2eae9aa..c61c870b94dbd28e49d0bee39879d7a21bd0d54a 100644 (file)
@@ -617,4 +617,20 @@ vlc_dictionary_remove_value_for_key( const vlc_dictionary_t * p_dict, const char
     /* No key was found */
 }
 
+#ifdef __cplusplus
+// C++ helpers
+template <typename T>
+void vlc_delete_all( T &container )
+{
+    typename T::iterator it = container.begin();
+    while ( it != container.end() )
+    {
+        delete *it;
+        ++it;
+    }
+    container.clear();
+}
+
+#endif
+
 #endif