Fix -Wrange-loop-construct from gcc11

This commit is contained in:
loonycyborg 2021-05-12 13:39:47 +03:00
parent 3e8d81f473
commit 1f8101ef22
No known key found for this signature in database
GPG key ID: 6E8233FAB8F26D61
3 changed files with 4 additions and 4 deletions

View file

@ -301,7 +301,7 @@ public:
virtual config to_config() const
{
config cfg = aspect::to_config();
for (const typesafe_aspect_ptr<T> f : facets_) {
for (const typesafe_aspect_ptr<T>& f : facets_) {
cfg.add_child("facet",f->to_config());
}
if (default_) {

View file

@ -489,7 +489,7 @@ public:
void merge_attributes(const config &);
template<typename... T>
void remove_attributes(T... keys) {
for(const std::string& key : {keys...}) {
for(const std::string key : {keys...}) {
remove_attribute(key);
}
}
@ -497,7 +497,7 @@ public:
template<typename... T>
void copy_attributes(const config& from, T... keys)
{
for(const std::string& key : {keys...}) {
for(const std::string key : {keys...}) {
auto* attr = from.get(key);
if(attr) {
(*this)[key] = *attr;

View file

@ -74,7 +74,7 @@ static void dump_recall_list_to_console(const T& units)
LOG_DP << "size: " << units.size() << "\n";
std::size_t idx = 0;
for(const unit_const_ptr& u_ptr : units) {
for(const auto& u_ptr : units) {
LOG_DP << "\tunit[" << (idx++) << "]: " << u_ptr->id() << " name = '" << u_ptr->name() << "'\n";
}
}