← Back to team overview

kicad-developers team mailing list archive

compile warnings about copying loop variable

 

I get a lot of compile warnings like this:

In file included from /Users/lijon/Coding/kicad/include/dialog_shim.h:29:
/Users/lijon/Coding/kicad/include/hashtables.h:87:26: warning: loop
variable 'c' is always a copy because the range of type 'const
wxString' does not return a reference
      [-Wrange-loop-analysis]
        for( const auto& c : aString )
                         ^
/Users/lijon/Coding/kicad/include/hashtables.h:87:14: note: use
non-reference type 'wxUniChar'
        for( const auto& c : aString )
             ^~~~~~~~~~~~~~~


-- 
/Jonatan
http://kymatica.com


Follow ups