Inspection: Variable can be moved to init statement

This commit is contained in:
Urs Fleisch
2024-01-20 18:06:51 +01:00
parent 5d921c6325
commit dfe2aa5253
40 changed files with 149 additions and 220 deletions

View File

@@ -119,8 +119,7 @@ namespace
#endif
String ext;
const int pos = s.rfind(".");
if(pos != -1)
if(const int pos = s.rfind("."); pos != -1)
ext = s.substr(pos + 1).upper();
// If this list is updated, the method defaultFileExtensions() should also be