mirror of
https://github.com/taglib/taglib.git
synced 2026-08-27 12:47:01 -04:00
manual range loop conversions (#1126)
* manual range loop conversions Signed-off-by: Rosen Penev <[email protected]> * Restore const containers where non const temporaries are iterated * Use std::as_const() instead of const container copies where possible --------- Signed-off-by: Rosen Penev <[email protected]> Co-authored-by: Urs Fleisch <[email protected]>
This commit is contained in:
co-authored by
Urs Fleisch
parent
303b55fb97
commit
524b588a1e
@@ -38,6 +38,7 @@
|
||||
#include "mp4file.h"
|
||||
#include "tag.h"
|
||||
#include <cstring>
|
||||
#include <utility>
|
||||
#include "id3v2framefactory.h"
|
||||
#include "tpropertymap.h"
|
||||
|
||||
@@ -259,8 +260,8 @@ void taglib_tag_free_strings()
|
||||
if(!stringManagementEnabled)
|
||||
return;
|
||||
|
||||
for(auto it = strings.cbegin(); it != strings.cend(); ++it)
|
||||
free(*it);
|
||||
for(auto &string : std::as_const(strings))
|
||||
free(string);
|
||||
strings.clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user