mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 10:53:51 +00:00
Fix warning -Wrange-loop-construct
apps/openmw/mwgui/loadingscreen.cpp:81:36: warning: loop variable 'extension' of type 'const std::__cxx11::basic_string<char>' creates a copy from type 'const std::__cxx11::basic_string<char>' [-Wrange-loop-construct] for(auto const extension: supported_extensions) ^ apps/openmw/mwgui/loadingscreen.cpp:81:25: note: use reference type 'const std::__cxx11::basic_string<char> &' to prevent copying for(auto const extension: supported_extensions) ^~~~~~~~~~~~~~~~~~~~~ &
This commit is contained in:
parent
3b9a51b8ac
commit
975e4f9908
1 changed files with 1 additions and 1 deletions
|
@ -78,7 +78,7 @@ namespace MWGui
|
|||
size_t pos = name.find_last_of('.');
|
||||
if (pos != std::string::npos)
|
||||
{
|
||||
for(auto const extension: supported_extensions)
|
||||
for(auto const& extension: supported_extensions)
|
||||
{
|
||||
if (name.compare(pos, name.size() - pos, extension) == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue