mirror of
https://github.com/taglib/taglib.git
synced 2025-07-18 21:14:23 -04:00
manual range loop conversions (#1126)
* manual range loop conversions Signed-off-by: Rosen Penev <rosenp@gmail.com> * 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 <rosenp@gmail.com> Co-authored-by: Urs Fleisch <ufleisch@users.sourceforge.net>
This commit is contained in:
@ -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